I have the following select statement:
select count(*) from article where $search_type like '%$search_request%
which works fine if $search_type is a specific field in my mysql database.
What I'd like to do is a row count if the specified search_request appears in ANY of several fields, so for instance the word could appear in "firstname" and/or "lastname".
In my select to retrieve data i use:
select id_article, title, concat('firstname', ' ', 'lastname') as author from article where $search_type like '%$search_request%'
How can I change change my select count(*) to work? Should I be using a concat or is there another way?
thanks