I have a mysql database and there's a NAME field, all records are saved the following way:
Norton, Peter
Monks, Perl
everything is: Last name, First name I want that when the user searches for: First Name Last Name it makes the search for both (First Last/Last First).
I tried this:
$name=param("name");
$name=~s/ /%/g;
$sql="select * from table where name like "%$name%";