Good morning,
I have a PHP page that searches a mysql database and returns any results. the fields are FIRSTNAME and SURNAME, separate fields within the table.
I have run the following search from the mysql command line and the results are correct:
select * from user_data where concat_ws(' ', firstname, lastname) LIKE 'Fred Smith';
However when I transfer this into my PHP page it doesn't return any results:
$sql = "SELECT * from user_data where concat_ws(' ', firstname, lastname) like '$search'";