[UPHPU] Query Help
Webot Graphics
graphics at westernbotanicals.com
Thu Apr 5 14:03:53 MDT 2007
I am trying to match a search form with items in a mysql database
this is the code I have, but it doesn't work.
$searchstring = ($_GET['search']);
$sql = "SELECT * MATCH(Customer_Product_Name) AGAINST
('$searchstring') AS score FROM Customer_Product_Names WHERE MATCH
(Customer_Product_Name) AGAINST ('$searchstring') ORDER BY score DESC";
$result = @mysql_query($sql);
if (!$result) {
exit('<p>Error performing query: ' . mysql_error() . '</p>');
}
this is the error I get when searching for "formula"
Error performing query: 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 'MATCH(Customer_Product_Name) AGAINST
('formula') AS score FROM Customer_Product_' at line 1
Justin Giboney
Graphic Design
Western Botanicals
Ph:800.651.4372, Fax:866.366.4372
More information about the UPHPU
mailing list