MySQL query error: SELECT t.id, s.name AS side, st.position , t.name, t.remix, f.id AS format_id, f.name AS format, i.id AS item_id, s.id as side_id, c.playcount FROM `discography_release` r JOIN `discography_item` i JOIN `discography_side` s JOIN `discography_sidetrack` st JOIN `discography_track` t LEFT JOIN `discography_soundclips` c ON t.id = c.track_id, `discography_format` f WHERE t.id = st.track_id AND st.side_id = s.id AND s.item_id = i.id AND i.release = AND r.id = i.release AND i.format_id = f.id ORDER BY i.position, s.position, st.position 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 'AND r.id = i.release AND i.format_id = f.id ORDER BY i.position, s.posit' at line 7 MySQL error code: 1064 Date: Sunday 26th 2014f October 2014 12:20:38 AM