Page 1 of 1

Problems with MySQL FULL TEXT searching...

Posted: Tue Jan 15, 2008 11:14 pm
by Mr Tech
I'm using the following queries to run two FULL TEXT searches on the one page

Code: Select all

select *, MATCH (title, about) AGAINST ('socks') AS score from gentv_videos where MATCH (title, about) AGAINST ('socks')
and

Code: Select all

select *, MATCH (title, about) AGAINST ('socks') AS score from gentv_podcasts where MATCH (title, about) AGAINST ('socks')
The first one works fine but the second one resturn's no results. They are exactly the same table layout and both contrain the word socks in the about row.

Here's the table structures:

Code: Select all

CREATE TABLE `gentv_videos` (
  `id` int(10) NOT NULL auto_increment,
  `date_entered` datetime NOT NULL default '0000-00-00 00:00:00',
  `title` text NOT NULL,
  `about` text NOT NULL,
  `file` text NOT NULL,
  `thumb` text NOT NULL,
  `speaker_id` int(10) NOT NULL default '0',
  `cat_id` int(10) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  FULLTEXT KEY `search` (`title`,`about`)
) ENGINE=MyISAM;
 
INSERT INTO `gentv_videos` (`id`, `date_entered`, `title`, `about`, `file`, `thumb`, `speaker_id`, `cat_id`) VALUES (1, '2008-01-09 16:07:16', 'Test Video', 'This video rocks my socks!', 'test.flv', '', 1, 1);

Code: Select all

CREATE TABLE `gentv_podcasts` (
  `id` int(10) NOT NULL auto_increment,
  `date_entered` datetime NOT NULL default '0000-00-00 00:00:00',
  `title` text NOT NULL,
  `about` text NOT NULL,
  `file` text NOT NULL,
  `thumb` text NOT NULL,
  `speaker_id` int(10) NOT NULL default '0',
  `cat_id` int(10) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  FULLTEXT KEY `search` (`title`,`about`)
) ENGINE=MyISAM;
 
INSERT INTO `gentv_podcasts` (`id`, `date_entered`, `title`, `about`, `file`, `thumb`, `speaker_id`, `cat_id`) VALUES (1, '2008-01-10 14:38:45', 'Test Podcast', 'This podcast rocks my socks!', 'test.mp3', '', 1, 1);
They are pretty much exactly the same. Why will one work and the other wont?