Hi $eid2 = mysql_query("SELECT id FROM engines WHERE keyword = '%$tricker_engine%' LIMIT 1") or die(mysql_error()); $row = mysql_fetch_assoc($eid2); $eid = $row['id']; PHP: I want $eid to be the ID of the row where keyword = '%$tricker_engine%'. What is wrong with my code above?
mysql_fetch_array() I think ? $eid2 = mysql_query("SELECT id FROM engines WHERE keyword = '%$tricker_engine%' LIMIT 1") or die(mysql_error()); $row = mysql_fetch_array($eid2); $eid = $row['id']; PHP:
$eid2 = mysql_query("SELECT id FROM engines WHERE keyword LIKE ('%".$tricker_engine."%') LIMIT 1") or die(mysql_error());