Solved

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

Posted on 2008-10-01
1
164 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
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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 four methods for overlaying images in a container on a web page
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

708 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now