array(3) { [0]=> string(18) "Error Number: 1064" [1]=> string(162) "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 h.type = 'g'' at line 4" [2]=> string(132) " SELECT h.* FROM st_hierarchy h WHERE h.prod_or_cat_id = AND h.type = 'g' " }