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 stock.category_id = stock_xref_category.id AND stock_xref_category.typ' at line 1
SELECT * FROM `artist`, `stock_xref_`, `stock_xref_category`, `stock` WHERE stock._id=stock_xref_.id AND stock_xref_. = '' AND stock.category_id = stock_xref_category.id AND stock_xref_category.type = 'O' AND ( stock.status_id = '4' OR stock.status_id = '5' OR stock.status_id = '11' ) AND stock.artist_id = artist.id AND ( stock.status_id = '4' OR stock.status_id = '5' OR stock.status_id = '11' ) AND stock.live = 'Y' AND `inc_on_website` = 'Y' ORDER BY artist.surname, artist.firstname, stock.title ASC