I have an error using the mysql_fetch_assoc defined function..i used it before in a lot of my scripts..what im i doing wron here?? its get an id value from the previous page..it does pass the $_GET proeperly..urghh lol hehe π‘
[code=php]
if(isset($_GET[‘key’])) {
$id = $_GET[‘key’];
$mysql_server = “***********”;
$mysql_user = “***********”;
$mysql_password = “***********”;
$connect=mysql_connect ($mysql_server, $mysql_user, $mysql_password) or die(“cannot make connection”);
$dbselect=mysql_select_db (“***********”) or die(“cannot select database”);
//sql statments
$result = mysql_query(“SELECT * WHERE ordernum = `$id`;”);
while ($row = mysql_fetch_assoc($result))
{
echo $row[“prodnum”];
}
}
I get the following php error:
[I]Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/content/h/i/s/hispanonatura/html/test/products5/admin/vieworder.php on line 31
any suggestions are apprecited ?