vicodin Posted February 28, 2008 Share Posted February 28, 2008 mysql_fetch_array(): supplied argument is not a valid MySQL result resource in (points to where my functions page.) function SearchIt($search){ if (!empty($search)){ $search = CheckData($search); $search = explode(" ",$search); mysql_select_db("mediapil_mkmdata") or die(mysql_error()); foreach($search as $words){ $query =("SELECT * FROM products WHERE MATCH(keywords) AGAINST('$words')"); while ($row = mysql_fetch_array($result)){ echo'My product results'; } } } } anyone know why its giving that error? Link to comment https://forums.phpfreaks.com/topic/93555-mysql-error-help-please/ Share on other sites More sharing options...
premiso Posted February 28, 2008 Share Posted February 28, 2008 Your not running www.php.net/mysql_query on the $query this not having a valid resource. function SearchIt($search){ if (!empty($search)){ $search = CheckData($search); $search = explode(" ",$search); mysql_select_db("mediapil_mkmdata") or die(mysql_error()); foreach($search as $words){ $query =mysql_query("SELECT * FROM products WHERE MATCH(keywords) AGAINST('$words')"); while ($row = mysql_fetch_array($result)){ echo'My product results'; } } } } Link to comment https://forums.phpfreaks.com/topic/93555-mysql-error-help-please/#findComment-479397 Share on other sites More sharing options...
vicodin Posted February 28, 2008 Author Share Posted February 28, 2008 Im a retard... thanks Link to comment https://forums.phpfreaks.com/topic/93555-mysql-error-help-please/#findComment-479405 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.