Error text : SELECT COUNT(*) FROM (
SELECT
mgb.*,
mb.businessName,
mb.businessLinkName
FROM
mg_gamebusiness mgb
LEFT JOIN
mg_business mb
ON
mgb.businessId = mb.businessId
WHERE
mgb.gameId =
AND
mgb.gameId=9
ORDER BY mgb.sorting ASC
) vt
Error Number : 1064
Error Message : 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 'AND
mgb.gameId=9
ORDER BY mgb.sorting ASC
) vt' at line 14