Hi:
This is the code I used:
<html>
<head><title>processform</title>
</head>
<body>
<?php
// include MySQL-processing classes
$var = @$_GET['q'];
$trimmed = trim($var);
// connect to MySQL
$dbhost = "db.db.xxxxxxx.abc.com";
$dbname = "dbname";
$dbuser = "dbuser";
$dbpass = "password";
$link = mysql_connect($dbhost, $dbuser, $dbpass);
if (!$link) {
die('Could not connect: ' . mysql_error());
}
$db_selected = mysql_select_db('dbname');
if (!$db_selected) {
die('Could not select database: ' . mysql_error());
}
$keyword = mysql_real_escape_string($_POST['keyword']);
// Perform the fulltext search
$sql = "SELECT productID, ArtistName, year, Genre, TypeOfDisc, Price, image
FROM searches WHERE MATCH(ArtistName) AGAINST ('$keyword', IN BOOLEAN MODE)
LIMIT 0 , 30";
$query = mysql_query($sql) or die(mysql_error());
$row_sql = mysql_fetch_assoc($query);
$total = mysql_num_rows($query);
if($total>0) {
while ($row_sql = mysql_fetch_assoc($query)) {//echo out the results
echo ''.$row_sql['ArtistName'].'<br />'.$row_sql['Price'].'';
}
} else
{
echo '<div class="maincontainer"><h2>No results were found, Go
back and try a new search.</h2></div>'.'';
}
echo '</div>';
?>
</body>
</html>
This is the error I got:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' IN BOOLEAN MODE) LIMIT 0 , 30' at line 2
Can someone please help? Thanks