Hello,

I have a php page which pull data from myusql database...
I'm new to php so I looking for some advice ...
I have a field which contains numbers and needed to have them totaled after
the query below the table...

Database:
|text1|text2|total|
|some|tfdfd|100|
|string|adfa|250|
|made|tofd|150|

total should be : 100+250+150

Query:
{$aresult=mysql_query("select * from testdb  ,$db);}
while($amyrow = mysql_fetch_array($aresult))
{
echo "<Tr><td>";
{echo $amyrow["text1"];}
echo "</td><td>";
{echo $amyrow["text2"];}
echo "</td>";
}
echo "</td></tr></table>";
echo "all together : total";

total is : 500


Thanks,

Andras Kende


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to