Jump to content


Photo

SELECT FROM - question


  • Please log in to reply
1 reply to this topic

#1 stualk

stualk
  • Members
  • PipPipPip
  • Advanced Member
  • 109 posts

Posted 19 October 2006 - 09:22 AM

I want to do a 'SELECT * from db' query where the database contains certains words. How do I do this?

For example, in pseudo:

"Select* from db where FIELD contains the words 'word1','word2','word3'" etc

Is this possible?

#2 xsist10

xsist10
  • Members
  • PipPipPip
  • Advanced Member
  • 114 posts

Posted 19 October 2006 - 09:34 AM

SELECT * FROM tab WHERE field LIKE "%word1%" AND field LIKE "%word2%" AND field LIKE "%word3%";

SA PHP Archives - www.phparchives.za.org




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users