SELECT `users`.`firstname`, `users`.`lastname`, `users`.`id`,
CONCAT(firstname," " ,lastname) AS `users.firstnamelastname`,
CONCAT(lastname," " ,firstname) AS `users.lastnamefirstname`
FROM `users`
WHERE (id != '15')
AND (firstnamelastname like 'a%' )
OR (lastnamefirstname like 'a%')
The above code I am using to search against a concated field but the above is not working. Is there anyone sql guru to help me out.
See Question&Answers more detail:os