Hey,
Ok I have setup a table in mySQL that I want to do a FULLTEXT search on. My table structure is as such:
CREATE TABLE tbl_events (
fld_id varchar(7) NOT NULL default '',
fld_name varchar(255) NOT NULL default '',
fld_text text NOT NULL,
PRIMARY KEY (fld_id),
FULLTEXT KEY event_search (fld_name,fld_text)
) TYPE=MyISAM;
I added the following line of code to create the FULLTEXT index:
ALTER TABLE tbl_events ADD FULLTEXT event_search (fld_name, fld_text)
Now, I have the following snippet of code to search the table:
$sql = "SELECT fld_id, fld_name FROM tbl_events";
$sql .= " WHERE MATCH(fld_name, fld_text) AGAINST ('".$keyword."')";
Now, this brings up all results found in the fld_name field but doesn't bring up anything in the fld_text field. Could it be because the fld_text field is set to "text" while the fld_name field is set to "varchar"?
Any ideas?
Cheers,
Chris