Invalid query: SELECT q.*, r.ratingid, r.ipaddress, r.rating FROM mqdb_quotes q LEFT JOIN mqdb_ratings r ON (q.quoteid = r.quoteid AND ipaddress = '3.236.232.99') WHERE q.characterid = '10851' ORDER BY q.quoteid ASC