RE: [PHP-DB] wildcard in mysql search with php
| From: | Nally, Tyler G. | Date: | Thu, 18 Oct 2001 12:57:25 +0000 |
| Subject: | RE: [PHP-DB] wildcard in mysql search with php | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-13475@lists.php.net to get a copy of this message | ||
> From: Thomas "omega" Henning [mailto:tomi@mediasoft.ro]
> Subject: [PHP-DB] wildcard in mysql search with php
>
> Is there a way to use wildcards in search in a mySQL db?
> e.g. I have a dbase of over 24000 records and i can only search exact
> matches is there a way to search something like this :
> *admin* in mySQL? Or
> i have to do it by hand in PHP?
Sure... you do it like this...
search column_name
from table_name
where column_name like '%admin%'
--
__ _ Tyler Nally
/ /__ ____ _(_)___ ____ ____ _________ _ tnally@legion.org
/ / _ \/ __
/ / __ \/ __ \ / __ \/ ___/ __ / 317-860-3016
/ / __/ /_/ / / /_/ / / / // /_/ / / / /_/ / American Legion Website
/_/\___/\__, /_/\____/_/ /_(_)____/_/ \__, / http://www.legion.org
/____/ /____/