MySQL Forums
Forum List  »  PHP

Full text search
Posted by: Thomas Hengstl
Date: December 24, 2012 03:15PM

I am trying to create a full text search with a seach field. I can't find the mistake in my code. Can somebody help me?

<form action="this.php?">

<input type="text" name="keyword">

<input type="submit" value="submit">


$con = mysql_connect("localhost","user","password");
if (!$con){
die("Can not connect: " . mysql_error());
} else echo "Connection successfull" . "<br />" ;

mysql_select_db ("AN-index",$con);
$sql = "SELECT * FROM Notes WHERE MATCH (Abstract, Homepage_title) AGAINST('$keyword')";
$mydata = mysql_query($sql);

while($record = mysql_fetch_array ($mydata)){
echo $record [Homepage_title];
echo "<br />";
echo "Test";


Options: ReplyQuote

Written By
Full text search
December 24, 2012 03:15PM
December 26, 2012 12:45PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.