mwouters Posted April 4, 2006 Share Posted April 4, 2006 Hello,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:[code]SELECT ID AS blogID, titel, tekst, MATCH (titel, tekst) AGAINST ('Belgacom') AS ranking FROM blog WHERE MATCH (titel, tekst) AGAINST ('Belgacom')[/code]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:[code]CREATE TABLE `blog` ( `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, UNIQUE KEY `ID` (`ID`), FULLTEXT KEY `titel` (`titel`,`tekst`)) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=5;[/code]Thanks a lot for any help, I don't know what to do..Mark. Quote Link to comment https://forums.phpfreaks.com/topic/6573-no-results-with-fulltext-search/ Share on other sites More sharing options...
gijew Posted April 4, 2006 Share Posted April 4, 2006 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 = / Quote Link to comment https://forums.phpfreaks.com/topic/6573-no-results-with-fulltext-search/#findComment-23895 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.