Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_php thread: MySQL searching any match


Message #1 by "Sokun, Chorn" <sokunxp@g...> on Fri, 22 Feb 2002 00:23:09 +0700
On Fri, 22 Feb 2002, Sokun, Chorn wrote:

> sites(
> id int auto_increment primary key,
> title varchar(30),
> keywords varchar(60),
> description varchar(200),
> index (title,keywords,description))
>
> I can search match whole phase successfully.
> But how do I make search to match any word.

With a separate table:

wordlist (
	word varchar(50),
	site_id int(11) unsigned
)

Make sure you put an index on the word field.

-- CS


  Return to Index