Jump to content

mysql_fetch_array(): supplied argument is not a valid MySQL result


HDFilmMaker2112

Recommended Posts

I'm pretty much taking over the MySQL sub-forum... lol.

Sorry for so many threads guys, but this is the first time I've been this in depth in MySQL.

 

The below is throwing the following error:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/zyquo/public_html/ghosthuntersportal.com/product_process.php on line 33

 

Line 33 is: while($row11=mysql_fetch_array($result11)){

 

elseif($_GET['do']=="add"){
$sql10="INSERT INTO $tbl_name (product_name, product_price, product_category, product_link, product_image, product_tag, product_features, product_pros, product_cons, product_description, product_notes) VALUES ('$product_name', '$product_price', '$product_category', '$product_link', '$product_image', '$product_tag', '$product_features', '$product_pros', '$product_cons', '$product_description', '$product_notes')";
mysql_query($sql10);
$sql11="SELECT product_id FROM $tbl_name WHERE product_name=".$product_name."";
$result11=mysql_query($sql11);
while($row11=mysql_fetch_array($result11)){
$product_id2=$row11['product_id'];
$sql12="INSERT INTO $tbl_name2 (keyword,product_id) VALUES ('$keyword','$product_id2')";
mysql_query($sql12);
}
}

 

query sql10 runs and inserts the data, query sql11 does not run.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.