Getting the ID from a MySql table?
Posted: Mon Aug 02, 2010 7:20 am
Hi
I want $eid to be the ID of the row where keyword = '%$tricker_engine%'.
What is wrong with my code above?
Code: Select all
$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'];What is wrong with my code above?