Re: LIKE condition in query
| From: | Don Hicks | Date: | Tue, 05 Nov 2002 18:59:50 +0000 |
| Subject: | Re: LIKE condition in query | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-122840@lists.php.net to get a copy of this message | ||
BINGO!
That was exactly what I needed!
Thanks!
Don.
===============
"Jay Blanchard" <jay.blanchard@niicommunications.com> wrote in message
news:003801c284fc$4fd8d2b0$8102a8c0@000347D72515...
> [snip]
> $Query="
> SELECT FieldName1, FieldName2
> FROM TableName
> WHERE FieldName1 LIKE '$CriterionRecord'
> ";
> [/SNIP]
>
> The LIKE criteria needs to be surrounded by wildcards...
>
> WHERE FieldName1 LIKE '%$CriterionRecord%'
>
> HTH!
>
> Jay
>