This is the code:
$Query = "SELECT SUM(is.Quantity), is.ExternalSKU, ";
$Query .= "SUM(is.Quantity * is.ListPrice) AS Subtotal, is.Freight ";
$Query .= "FROM invoice_sku is, sku s, item i ";
$Query .= "WHERE is.Invoice = " . $UserInfo['Invoice'] . " ";
$Query .= "AND is.SKU = s.ID ";
$Query .= "s.Item = i.ID ";
$Query .= "GROUP BY is.Invoice, is.Freight";
$DatabaseResult = mysql_query($Query, $DatabaseLink);
while($DatabaseRow = mysql_fetch_row($DatabaseResult))
{
$ShippingInfo[$DatabaseRow[3]]["Quantity"] = $DatabaseRow[0];
$ShippingInfo[$DatabaseRow[3]]["ExternalSKU"] = $DatabaseRow[1];
$ShippingInfo[$DatabaseRow[3]]["Subtotal"] = $DatabaseRow[2];
$ShippingInfo[$DatabaseRow[3]]["Freight"] = $DatabaseRow[3];
/*
$ShippingInfo[$DatabaseRow[3]]["State"] = $shipAddress["StateProv"];
$ShippingInfo[$DatabaseRow[3]]["Country"] = $shipAddress["CountryCode"];
*/
$ShippingInfo[$DatabaseRow[3]]["State"] = "NY";
$ShippingInfo[$DatabaseRow[3]]["Country"] = "US";
}
This is the error:
Warning: Supplied argument is not a valid MySQL result resource in /var/www/testing/php-3/php3/junk/date.php3 on line 20
What does the error mean? What am I doing wrong? How can I correct It?
Thanks in Advance