trying to write a searching engine with php and mysql. my question is that as the an input keyed in the web site, the php tell mysql to search for it.
here is my code:
$sql = "SELECT * FROM `General` WHERE `Item_Name` LIKE $Name";
$conn=mysql_connect( $mysql_server_name, $mysql_username, $mysql_password );
$result=mysql_db_query( $mysql_database, $sql,$conn );
as the users will not type exact name of looking for item, so i would prefer to use LIKE instead of = sign.
somehow i always get error messages:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\Book_Shop\SearchOK.php on line 36
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\Book_Shop\SearchOK.php on line 47
please help. thank you very much.