Imagine a database with first and last names in separate columns. I need to be able to search by "<first name> <last name>" or "<last name> <first name>". Is there a better way than this?
SELECT lastname, firstname FROM wherever WHERE (CONCAT(lastname, ', ', firstname) LIKE "%Ray Hunter%" OR CONCAT(firstname, ' ', lastname) LIKE "%Ray Hunter%" ) _______________________________________________ UPHPU mailing list [email protected] http://uphpu.org/mailman/listinfo/uphpu IRC: #uphpu on irc.freenode.net
