Solved

why i am not getting any thing when i use the command match in php and mysql

Posted on 2008-10-01
1
170 Views
Last Modified: 2012-05-05
when i write this code and run the script i get no error and i get nothing but
one of my rows in d_title  --  have fsd in it
but when i search i get nothing while i need to get wow one time
$query = " SELECT d_title FROM link  
                WHERE MATCH (d_title) AGAINST ('fsd')"; 
    $res = mysql_query($query) or die(mysql_error()); 
    while ($row = mysql_fetch_array($res))
	 {
    echo "wow";
}

Open in new window

0
Comment
Question by:mgtm3
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 82

Accepted Solution

by:
hielo earned 500 total points
ID: 22616170
you need to use a MyISAM table AND you need to create a fulltext index:

CREATE TABLE `link`(`d_title` TEXT, FULLTEXT(`d_title`)) TYPE=MyISAM;
0

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question