Re: Error I dont understand

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Better you make it like this :

while($row = mysql_fetch_array($result)){
extract($row);
// Increment the total cost of all items
$totalCost += ($qty * $itemPrice);
}

try it... hope it'll help.

----- Original Message ----
From: teacherweeks <teacherweeks@xxxxxxxxx>
To: php-objects@xxxxxxxxxxxxxxx
Sent: Tuesday, June 12, 2007 3:45:06 AM
Subject:  Error I dont understand

I am getting an error on a line of code that I don't understand and I
am hoping that someone can explain it to me. I will include the error
and line of code that it is telling me is the problem.

Weeks

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

while($row = mysql_fetch_array($result)){
// Increment the total cost of all items
$totalCost += ($row["qty"] * $row["itemPrice"]);



PHP Data object relational mapping generator
http://www.metastorage.net/ 
Yahoo! Groups Links










       
____________________________________________________________________________________
Get the free Yahoo! toolbar and rest assured with the added security of spyware protection.
http://new.toolbar.yahoo.com/toolbar/features/norton/index.php

[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux