Re: [PHP] keyword search syntax

2003-10-28 Thread Raditha Dissanayake
If you put up a full text index on it you can do searches that smell 
like a primitive search engine.

best regards

Robb Kerr wrote:

On Tue, 28 Oct 2003 02:09:06 +, David Otton wrote:

 

Personally, I'd normalize that into a keyword table, a record table and a
joining table.
However, the SQL keyword you're looking for is LIKE

WHERE field LIKE '%$variable%'
   

I agree. I'd structure the data quite differently. But, I've got the data
from a client and at this point I don't have the authority to restructure
the database. Thanx for the tip on the LIKE command.
Robb

 



--
Raditha Dissanayake.

http://www.radinks.com/sftp/  |  http://www.raditha/megaupload/
Lean and mean Secure FTP applet with  |  Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB  |  with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] keyword search syntax

2003-10-28 Thread Robb Kerr
On Tue, 28 Oct 2003 19:37:10 +0600, Raditha Dissanayake wrote:

 If you put up a full text index on it you can do searches that smell 
 like a primitive search engine.
 
 best regards

Thanx. The LIKE operator wouldn't work. But, your tip on creating a
FULLTEXT index and executing a MATCH... AGAINST command worked like a
dream.
-- 
Robb Kerr
Digital IGUANA

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



[PHP] keyword search syntax

2003-10-27 Thread Robb Kerr
I've got a field in my database that contains keywords about the particular
record. I've got a form with a text entry field for visitors to enter
keywords for which they would like to find records whose keyword field
contains the words they entered. The submission form assigns the keywords
entered to a variable which is passed via GET to the results page. What is
the syntax for generating this query. I tried the following but it doesn't
work...

WHERE field CONTAINS $variableContainingKeywordEntry

Can anyone help? Thanx in advance,
Robb Kerr
-
Digital IGUANA
Helping Digital Artists Achieve their Dreams
http://www.digitaliguana.com
http://www.cancerreallysucks.org

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



Re: [PHP] keyword search syntax

2003-10-27 Thread David Otton
On Mon, 27 Oct 2003 20:00:24 -0600, you wrote:

I've got a field in my database that contains keywords about the particular
record. I've got a form with a text entry field for visitors to enter
keywords for which they would like to find records whose keyword field
contains the words they entered. The submission form assigns the keywords
entered to a variable which is passed via GET to the results page. What is
the syntax for generating this query. I tried the following but it doesn't
work...

WHERE field CONTAINS $variableContainingKeywordEntry

Personally, I'd normalize that into a keyword table, a record table and a
joining table.

However, the SQL keyword you're looking for is LIKE

WHERE field LIKE '%$variable%'

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



Re: [PHP] keyword search syntax

2003-10-27 Thread Robb Kerr
On Tue, 28 Oct 2003 02:09:06 +, David Otton wrote:

 
 Personally, I'd normalize that into a keyword table, a record table and a
 joining table.
 
 However, the SQL keyword you're looking for is LIKE
 
 WHERE field LIKE '%$variable%'

I agree. I'd structure the data quite differently. But, I've got the data
from a client and at this point I don't have the authority to restructure
the database. Thanx for the tip on the LIKE command.

Robb

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