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 '' LIMIT 1' at line 1(Checking for product pagename) sql: SELECT id FROM pages WHERE pagename = 'Girls'-Clothes' LIMIT 1
Fatal error: Call to a member function getSingleResult() on a non-object in /home/directpi/public_html/library/pagenames.php on line 28