[thelist] text keys in MySQL

Christopher Joseph Christopher at ideadesigners.com
Mon Jul 1 20:04:01 CDT 2002

hmm......doesn't seem to be my day!

am trying to build a boolean search over mysql using php. Think the php is
OK but the SQL doesn't seem to be returning any records.

There are only two records in this table:

CREATE TABLE faqcont (
  artid int(11) NOT NULL auto_increment,
  faqid int(11) NOT NULL default '0',
  title text NOT NULL,
  content text NOT NULL,
  counter int(11) NOT NULL default '0',
  published int(11) NOT NULL default '0',
  checked_out int(11) NOT NULL default '0',
  checked_out_time time NOT NULL default '00:00:00',
  editor varchar(50) NOT NULL default '',
  archived int(11) NOT NULL default '0',
  ordering int(11) default NULL,
  approved tinyint(4) default '1',
  PRIMARY KEY  (artid),
  FULLTEXT KEY faq_title (title,content)

this is the query -->

SELECT artid,faqid,title,content,
match (title,content) against ('XYZ') as relevance
FROM faqcont
match (title,content) against ('XYZ')>0
HAVING relevance>0
ORDER BY relevance DESC

Is my problem simply that because there are only two records the occurances
of the words are too common...not sure that makes sense but maybe someone
will comprehend


More information about the thelist mailing list