RE: [PHP-DB] search question

2002-09-17 Thread Cal Evans

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:[EMAIL PROTECTED]]
Sent: Tuesday, September 17, 2002 3:20 AM
To: [EMAIL PROTECTED]
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



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] search question

2002-09-17 Thread John Holmes

You could check out the FULLTEXT searching in MySQL, too. It's in the
manual. It has some quirks, but works well on a large database.

---John Holmes...

 -Original Message-
 From: Cal Evans [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 17, 2002 8:04 AM
 To: Meltem Demirkus; [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] search question
 
 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:[EMAIL PROTECTED]]
 Sent: Tuesday, September 17, 2002 3:20 AM
 To: [EMAIL PROTECTED]
 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
 
 
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php