Menu
I’m writing a PHP function which will search for user. lastname, firstname, location etc.
In my SQL command, I’m doing the following in my where clause AND `lastname` LIKE CONCAT(‘%’, ? , ‘%’)
The question is, if the user doesn’t use Last Name field in the search form it’s looking for an empty string. I want to disregard this if not used.
How can I do this?