Hello I keep getting a warning ...
Warning: mysql_fetch_arr ay(): supplied argument is not a valid MySQL result
resource in "name of my php file" when I run this query....
SELECT Menu_Item, Quantity
FROM restorder_item
WHERE Order_Number =58
The code I use to do it is....
$query = "select Menu_Item, Quantity from restorder_item" ;
$query .= " where Order_Number = ".$_REQUEST["OrderNumbe r"];
$result = mysql_query($qu ery) or die($query." failed: ".mysql_error() );
while ($row = mysql_fetch_arr ay($result, MYSQL_ASSOC)) {
var_dump($row);
}
Notice to test it I did a var_dump of $row and it came back with the
expected results namely......
array(2) { ["Menu_Item"]=> string(1) "3" ["Quantity"]=> string(1) "5" }
So I can't see whats wrong. Everything seems to be working yet I get a
warning.
I have done a quick fix by putting an @ in front of the offending function
but I would really like to know what the problem is.
Thanks for your help in advance.
Noel