I'm having a bit of a problem with a MySQL query in my PHP. I'm assuming it's down to a simple syntax issue and am hoping somebody here can help me out.
The query is:
SELECT * FROM `Threads` INNER JOIN `Categories` WHERE `Threads`.`Category_ID` = `Categories`.`Category_ID` AND `Categories`.`Category_Name` = 'General'
The purpose of the query is to allow for the row count of threads within a forum category to be used.
It seems that the first half of the query is working correctly but the part after the
AND statement is not.
Any help would be greatly appreciated.
SELECT * FROM `Threads` `t` INNER JOIN `Categories` `c` ON `t`.`Category_ID` = `c`.`Category_ID` WHERE `c`.`Category_Name` = 'General'