Couldn't execute query2 because: 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 's Point Resort' AND Status='Member'' at line 1 query2 = SELECT * FROM members WHERE city='Morgan's Point Resort' AND Status='Member' Program = ChapterCityCount.php