Combination in a query

wxdqz

New Member
Hi,

I've got something which is more of a SQL problem than PHP, but I figured this would be the perfect place to find help.

I need to compare a variable ( $name ) to a combination of three table fields which are name , name1 and name2.

The form of $name is ' name - name1 - name2 '

So to make it clear, the ideal query (which of course doesn't work) would be:

select * from table where '$name' = name - name1 - name2

An idea anyone?
 
Back
Top