Re: conditions in select * from
| From: | Ryan Adams | Date: | Mon, 19 Jun 2000 15:14:54 +0000 |
| Subject: | Re: conditions in select * from | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-2203@lists.php.net to get a copy of this message | ||
the 'like' operator is probably the best bet.
like "select * from table where field like '%$word%'"
hth
ryan
On Sun, Jun 18, 2000 at 11:23:31PM -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?
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
---end quoted text---