Jump to content

Please help, I want to sum the no.


Shawn

Recommended Posts

I think you mean you have a table named record that has a field named print and you want to total that field using the data from each row returned.

$query = mysql_query("select * from record where id='$id'");$objSum = 0;while ($row = mysql_fetch_array($query)) {   $objSum += $row['print']; }echo $objSum;

Let us know if that is not what you meant.-hs

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...