Solved

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

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PHP not parsing ' character 12 46
how to use Initialization Vector for openssl_encrypt() 5 58
Ajax and PHP 4 29
issue with DB import 1 17
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

840 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