Error() [1064]: 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 'or A.pg_Id IN (SELECT f_pg_Id FROM Pages A WHERE pg_Id = ) /* parent */ ' at line 6