Hi,
I have a MySQL statement, namely:
SELECT COUNT(*) AS Count FROM images i LEFT JOIN categories c ON
i.cat_id=c.id LEFT JOIN subcategories s ON i.subcat_id=s.id

I want to change the LEFT JOINs to INNER JOINs like so:
SELECT COUNT(*) AS Count FROM images i INNER JOIN categories c ON
i.cat_id=c.id INNER JOIN subcategories s ON i.subcat_id=s.id

But as soon as I do that I get this error message:
MySQL Error: 1064 (You have an error in your SQL syntax near 'INNER JOIN
categories c ON i.cat_id=c.id INNER JOIN subcategories s ON i.subcat_' at
line 1)
Session halted.

Help please. Thanks,

Matt Stone
_______________________________

This email may contain confidential and/or privileged information for the
sole use of the intended recipient. Any review or distribution by others is
strictly prohibited. If you have received this email in error, please
contact the sender and delete all copies. Opinions, conclusions or other
information expressed or contained in this email are not given or endorsed
by the sender unless otherwise affirmed independently by the sender.

_________________________________


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to