View Single Post
Old 05-27-2010, 10:52 PM  
lost&found
Confirmed User
 
lost&found's Avatar
 
Join Date: Sep 2008
Location: canada..............eh?
Posts: 850
need help with a MySQL query!

OK so lets say you have a table with 6 columns and you want to query with a pattern match on 4 columns. How do I do this?

I can produce accurate result with 1 column like this:

SELECT * FROM tableName WHERE name LIKE '%pattern%'

That works with one column like 'name' but if I wanted to query other columns like name,title,comment,ect how would I form this SQL statement?

details:

MySQL 5.0.77
Al cols are Latin_general_ci

Ya I am a newbie with this stuff.....

__________________
need content?

Email me for exclusive or semi-exclusive!

sandraxxsyn @gmail.com

Last edited by lost&found; 05-27-2010 at 10:54 PM.. Reason: missed info
lost&found is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook