getting a variable into mysql_query
Posted: Tue Oct 07, 2003 3:32 am
Hi,
Im just wondering how to get a variable into this following line. the variable is $CID.
As it is i get "supplied argument is not a valid MySQL-Link resource"
mysql_select_db("ce",$db);
$query2 = mysql_query("SELECT * FROM tblProducts WHERE CategoryID = %s", $CID);
if ($myrow = mysql_fetch_array($query2)) {
Any ideas? sorry im a beginner.
Im just wondering how to get a variable into this following line. the variable is $CID.
As it is i get "supplied argument is not a valid MySQL-Link resource"
mysql_select_db("ce",$db);
$query2 = mysql_query("SELECT * FROM tblProducts WHERE CategoryID = %s", $CID);
if ($myrow = mysql_fetch_array($query2)) {
Any ideas? sorry im a beginner.