Posted on 2008-06-11
Im having a problem with a search function. What i want is to put multiple datafields from a table into a variable wich i, in the sql can search for with LIKE '%search_str%'
So far i have:
SELECT CONCAT(firstname, ' ', lastname) as full_name FROM tablename WHERE full_name LIKE '%search_str%'
It seams like i cant search for the concated field full_name. Any way to do this? Or is there another way to collect different datafields int one variable 'fictiv field' i can search for? This is the simplyfied sql to show what i mean, i have many other records taken out with the same criterias.