Re: Search all data in database
| From: | Dan Phiffer | Date: | Tue, 11 Mar 2003 18:14:39 +0000 |
| Subject: | Re: Search all data in database | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-139160@lists.php.net to get a copy of this message | ||
If you're using MySQL as your database system, you may want to look into
full-text search as well as the LIKE keyword.
http://www.mysql.com/doc/en/Fulltext_Search.html
http://www.mysql.com/doc/en/String_comparison_functions.html
HTH,
-Dan
"Mike Tuller" <php@ce.anoka.k12.mn.us> wrote in message
news:AD63FAD6-53E1-11D7-ADC1-0003938E6950@ce.anoka.k12.mn.us...
> I am wanting to add a simple search field where you enter your search
> and it searches the whole database, not just one column. It would be
> easy for one column ( SELECT * FROM clients WHERE first_name =
> '$first_name';) but how do I search the whole table? Do I have to
> search each column one by one or is there an easier, more efficient way
> of doing this?
>
> Thanks,
>
> Mike
>