Forum Moderators: open
$result = $db->sql_query('SELECT t.topicid, t.topicimage, t.topictext, count(s.sid) AS stories, SUM(s.counter) AS reads
FROM '.$prefix.'_topics t, '.$prefix.'_stories s WHERE s.topic = t.topicid
GROUP BY t.topicid, t.topicimage, t.topictext ORDER BY t.topictext',false, __FILE__, __LINE__);
/* and */
$result2 = $db->sql_query('SELECT s.sid, s.catid, s.title, c.title AS cat_title FROM '.$prefix.'_stories s, '.$prefix."_stories_cat c WHERE s.catid=c.catid
WHERE s.topic='$topicid' ORDER BY s.sid DESC LIMIT 0,10",false, __FILE__, __LINE__);
/* Error Msg */
CMS Warning line 51: On /index.php?name=Topics While executing query "SELECT t.topicid, t.topicimage, t.topictext, count(s.sid) AS stories, SUM(s.counter) AS reads FROM cms_topics t, cms_stories s WHERE s.topic = t.topicid GROUP BY t.topicid, t.topicimage, t.topictext ORDER BY t.topictext" the following error occured: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'reads FROM cms_topics t, cms_stories s WHERE s.topic = t.topici In: /******/modules/Topics/index.php on line: 22
Thanks for your time.