I'm having an issue with search.php. I am wondering how to parse $_GET["geo"] so that it can find cities with a space in the name (i.e. New York, San Diego). I used the 'LIKE' sql command and strtok() to separate the tokens(with a " " and a "," as the delimiters) and then compare them to the names in the places database. It works all but perfectly for queries like "Cambridge Massachusetts" or "Fresno, CA" or even just a zip or a city name.
Using this method for dividing up the queries won't work since "New" and "San" aren't going to represent any place name, or admin name in the database. I have been looking through this thread and the cs50 subreddit for some one with a similar issue but I haven't found anyone having this issue. Should I be using a different function to separate the "geo" query or a different method for comparing the SQL. Any suggestions would be helpful. Thanks.