query result error No: 1064 Msg: 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 'ORDER BY ba.newsdate DESC, ba.newsid DESC LIMIT 0,6' at line 15 SQL: SELECT ba.newsid, ba.title, ba.author_name, ba.shortdesc, ba.newsdate, ba.author_name, img.filename, img.description, plinks.permalink, plinks.friendlytitle, sc.categoryname
FROM news ba
JOIN newscategory sc ON ba.categoryid = sc.categoryid
LEFT JOIN cmsimages img ON img.typeid = ba.newsid
AND img.type = 'news'
AND img.imageorder = 1
LEFT JOIN permalinks plinks ON plinks.typeid = ba.newsid
AND plinks.type = 'news'
WHERE ba.title IS NOT NULL
AND (
ba.newsdateend > NOW()
OR ba.newsdateend IS NULL
)
AND sc.categoryid =
ORDER BY ba.newsdate DESC, ba.newsid DESC LIMIT 0,6
query result error No: 1064 Msg: 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 'ORDER BY ba.newsdate DESC, ba.newsid DESC' at line 15 SQL: SELECT ba.newsid, ba.author_name, ba.title, ba.shortdesc, ba.newsdate, ba.author_name, img.filename, img.description, plinks.permalink, plinks.friendlytitle, sc.categoryname
FROM news ba
JOIN newscategory sc ON ba.categoryid = sc.categoryid
LEFT JOIN cmsimages img ON img.typeid = ba.newsid
AND img.type = 'news'
AND img.imageorder = 1
LEFT JOIN permalinks plinks ON plinks.typeid = ba.newsid
AND plinks.type = 'news'
WHERE ba.title IS NOT NULL
AND (
ba.newsdateend > NOW()
OR ba.newsdateend IS NULL
)
AND sc.categoryid =
ORDER BY ba.newsdate DESC, ba.newsid DESC