You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-and-peter-c._id=stock_xref_heinrich-a.s.-and-peter-c..id AND stock_xref_heinric' at line 1
SELECT * FROM `artist`, `stock_xref_heinrich-a.s.-and-peter-c.`, `stock_xref_category`, `stock` WHERE stock.heinrich-a.s.-and-peter-c._id=stock_xref_heinrich-a.s.-and-peter-c..id AND stock_xref_heinrich-a.s.-and-peter-c..heinrich-a.s.-and-peter-c. = '' AND stock.category_id = stock_xref_category.id AND stock_xref_category.type = 'P' AND ( stock.status_id = '4' OR stock.status_id = '5' OR stock.status_id = '11' ) AND stock.artist_id = artist.id AND artist.surname = 'petersen and holm' AND artist.firstname = 'heinrich a.s. and peter c..php' AND ( stock.status_id = '4' OR stock.status_id = '5' OR stock.status_id = '11' ) AND stock.live = 'Y' AND stock.inc_on_website = 'Y' ORDER BY stock.id ASC