Resource id #7?
Posted: Wed Apr 05, 2006 4:50 pm
I'm getting this problem, and I have no clue what it means. This is the bit of code.
In MySQL, Resource id #7 is what gets stored in photographer from the INSERT query. But it's right. $photographer is a hidden form that has the correct value. Are there other problems that can cause that error? Thanks in advance.
~RB
Code: Select all
$sql = 'SELECT * FROM orders WHERE cartid = "'.$cartid.'" AND customerID = "'.$userid.'"';
$query = mysql_query($sql) or die(mysql_error());
if(mysql_num_rows($query) != 0){
//rows found
}else{
mysql_query("INSERT INTO orders (ordernum,cartid,album,albumid,customer,customerID,phone,email,photographer,address,city,state,zip) VALUE ('$new_name','$cartid','$albumname','$aid','$customer','$userid','$phone','$email','$photographer','$address','$city','$state','$zip')");
mysql_query('UPDATE carts SET ordernum = "'. $new_name .'", locked = "'. 1 .'" WHERE itemID = "'. $cartid .'"');
}~RB