Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
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…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.

920 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

13 Experts available now in Live!

Get 1:1 Help Now