RE: [PHP-DB] search question
| From: | Cal Evans | Date: | Tue, 17 Sep 2002 12:03:38 +0000 |
| Subject: | RE: [PHP-DB] search question | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-21796@lists.php.net to get a copy of this message | ||
it depends on how you design your database. When I know I will have this
situation, I design a table named keyWords. Put one work per record and
assign each word an ID number. Then I create a join table between keyWords
and whatever table they relate to. The join table only contains 2 fields,
the pk from keyWords and the pk from the other table. Then I ad 1 record to
the join table for each keyword that relates to each record in the other
table.
It's simple then to join the 3 tables in such a manner as to quickly find
the records in the other table that relate to a specific key word.
HTH,
=C=
*
* Cal Evans
* The Virtual CIO
* http://www.calevans.com
*
-----Original Message-----
From: Meltem Demirkus [mailto:mdemirkus@momentum-dmt.com]
Sent: Tuesday, September 17, 2002 3:20 AM
To: php-db@lists.php.net
Subject: [PHP-DB] search question
Hi,
Is there any other efficient way (--except using LIKE)of searching a keyword
in mysql ...
thanks
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php