I have a functioning mySQL search system.
mysql_query("SELECT * FROM electors WHERE constituency = '$constituency' AND ward = '$ward' AND (surname LIKE '$q' OR first_name LIKE '$q') LIMIT 18");
I want to also search if the entered term (including space) would be a concatenation of first_name ' ' surname. How is this done.
I think you will need CONCAT:
Which you may as well reduce down to:
Consider making this a full_name field in it’s own right, then you can index it for speed reasons.