I am trying to pull names from a table one at a time in alphabetical order. The query I use looks like this:
SELECT first_name FROM names WHERE first_name > '$currentName' ORDER BY first_name ASC LIMIT 1
This works fine except for names that contain a single quote. For example the name Andre would work, but Andre' would not (in my database it is escaped Andre\'). For some reason it doesn't find them at all. I have looked everywhere and cannot find a good way to do this. Any help would be appreciated.








Bookmarks