Error in query:
SELECT COUNT(*) AS total FROM site_product p WHERE p.lastname = 'D'Amore' AND p.firstname = 'Richard' ORDER BY CAST(priority AS SIGNED)
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 'Amore' AND p.firstname = 'Richard' ORDER BY CAST(priority AS SIGNED)' at line 1