mysql_fetch_row() not a valid result resource
Posted
by
user1717305
on Stack Overflow
See other posts from Stack Overflow
or by user1717305
Published on 2012-10-17T14:56:44Z
Indexed on
2012/10/17
17:01 UTC
Read the original article
Hit count: 142
I am confused, I don't know what's wrong. I'm about to transfer all data from my first table to the other. Here is my code:
$getdata = mysql_query("SELECT Quantity, Description, Total FROM ordercart");
while($row = mysql_fetch_row($getdata))
{
foreach($row as $cell){
$query1 = mysql_query("INSERT INTO ordermem (Quantity, Description, Total) VALUES
($cell)",$connect);
}
mysql_free_result($getdata);
}
I get the error: Warning: mysql_fetch_row(): 5 is not a valid MySQL result resource.
© Stack Overflow or respective owner