PDA

View Full Version : left join error


AN-net
03-12-2004, 10:11 PM
what did i do wrong now>_<

Invalid SQL: SELECT * FROM affiliates WHERE active='1' LEFT JOIN affiliates_types ON affiliates.type=affiliates_types.id ORDER BY sitename ASC
mysql error: 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 'LEFT JOIN affiliates_types ON affiliates.type=affiliates_types.

NTLDR
03-12-2004, 10:14 PM
There WHERE clause needs to after the LEFT JOIN clause.


SELECT
FROM
JOINS
WHERE
GROUP BY
ORDER BY

AN-net
03-12-2004, 10:28 PM
oh woops lol
thanks

AN-net
03-12-2004, 10:33 PM
ok its not displaying whats in affiliates_types table
edit: nvm got it working