select * from yourtable where question like '%life%'
---------- Original Message ----------------------------------
From: "Wolfgang Schneider" <[EMAIL PROTECTED]>
Reply-To: "Wolfgang Schneider" <[EMAIL PROTECTED]>
Date: Mon, 20 Aug 2001 12:22:15 +0200
>Hi
>
>I am a newbie to php + mysql and wanted to ask for some help on a
>particular item which I can't seem to find "the right key" in the
>documentation. I am trying to set up a simple Q&A system with an entry
>page where one can select to either have all questions & answers from a
>mysql database displayed or else search with a text field for only
>those questions which contain a certain word(s).
>
>Can someone tell me how to set in a query when trying to find records
>in a mysql table that have a certain word or perhaps 2 or 3 words
>(among others) ...?
>
> I know about using SELECT and WHERE in order to find records which
>match *exactly*, but am looking for something a bit different ...
>
>Example:
>The values of 3 records for the "question" field of the database might
>be the following:
>
>[1] How do you deal with anger?
>[2] Ever been full of anger in your life?
>[3] Is life always easy?
>
>How can I set a PHP query with SELECT and WHERE to express the
>following:
>
>Which questions contain the word "life"? That is, have someone search
>the database in the "question" field for records where the word "life"
>is used as part of the question ... The result then should return the
>records 2 & 3 above
>
>Any help is greatly appreciated. Thanks mucho.
>God bless you with His grace and peace
>Wolfgang
>
>Looking for Biblical information? COME AND SEE!
>-- ONLINE Courses: http://classes.bibelcenter.de ... NEW!
>-- BibelCenter: http://www.bibelcenter.de
>-- Bookstore: http://www.worthy.net/BibelCenter/
>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]