Re: conditions in select * from
| From: | Doug Semig | Date: | Mon, 19 Jun 2000 07:50:46 +0000 |
| Subject: | Re: conditions in select * from | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-463@lists.php.net to get a copy of this message | ||
Try a percent sign (%) in front and behind the word. For example:
SELECT * FROM table WHERE field LIKE '%word%';
Doug
At 11:24 PM 6/18/00 -0700, sarahana wrote:
>Hi,
>I was just wondering...
>
>Let's say a user chooses a word. And I want to select those entries in a
>database table for which the word exists as a PART of the data of the
>field name... i.e. the word may not be the data in the name field, but
>it may be a PART of the string.
>
>How can I do that?
>