Jump to content


No results with fulltext search

  • Please log in to reply
1 reply to this topic

#1 mwouters

  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 04 April 2006 - 04:10 PM


I'm trying to create a search using fulltext search, but it does not return any values. I don't get an error when I execute following SQL, but nor a result:

SELECT ID AS blogID, titel, tekst, MATCH (titel, tekst) AGAINST ('Belgacom') AS ranking FROM blog WHERE MATCH (titel, tekst) AGAINST ('Belgacom')

I did use a word with more than 5 letters as you can see, and the word does not return 100 times in the text (so it would be ignored).. so it should find a result..

I have MySQL 4.1.18 installed.

Can it have something to do with the charset?
If I do an export of my table structure I get this:

  `ID` int(11) NOT NULL auto_increment,
  `datum` datetime NOT NULL default '0000-00-00 00:00:00',
  `titel` text collate latin1_general_ci NOT NULL,
  `auteur` int(11) NOT NULL default '0',
  `tekst` text collate latin1_general_ci NOT NULL,
  `foto1` text collate latin1_general_ci,
  `foto2` text collate latin1_general_ci,
  `foto3` text collate latin1_general_ci,
  FULLTEXT KEY `titel` (`titel`,`tekst`)

Thanks a lot for any help, I don't know what to do..


#2 gijew

  • Members
  • PipPipPip
  • Advanced Member
  • 240 posts
  • LocationCalifornia

Posted 04 April 2006 - 06:26 PM

Have you tried using the die() function in PHP?

$sql = mysql_query("SELECT field1, field2 FROM table WHERE field1 = 'x' ORDER BY field1 ASC") or die(mysql_error());

Been using adodb for a while so my basic query may be off a bit - principle is still there = /
I'm considered good looking in some countries

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users