DB Error: Unknown column 'c.jQueryUrl' in 'where clause' ********************************* Here's the full query: SELECT * FROM libraries a LEFT JOIN labels b ON b.library_id = a.library_id WHERE (REPLACE(a.library_name,' ','') = ''+c.jQueryUrl+'' OR library_url = ''+c.jQueryUrl+'')