Jump to content

Archived

This topic is now archived and is closed to further replies.

metrostars

PHP Maths

Recommended Posts

Hi,
I have recordset with a field in called hours. How can I get all of the numbers in that field added together and displayed on the page via the use of some dynamic text? Bear in mind that there are more values being added to the recordset all the time.

Thanks in advance.

Share this post


Link to post
Share on other sites
[!--sql--][div class=\'sqltop\']SQL[/div][div class=\'sqlmain\'][!--sql1--][span style=\'color:blue;font-weight:bold\']SELECT[/span] [color=blue]SUM[/color](hours) [color=green]AS[/color] total [color=green]FROM[/color] [color=orange]tablename[/color] [!--sql2--][/div][!--sql3--]

Share this post


Link to post
Share on other sites
[!--quoteo(post=387445:date=Jun 24 2006, 02:53 PM:name=Barand)--][div class=\'quotetop\']QUOTE(Barand @ Jun 24 2006, 02:53 PM) [snapback]387445[/snapback][/div][div class=\'quotemain\'][!--quotec--]
[!--sql--][div class=\'sqltop\']SQL[/div][div class=\'sqlmain\'][!--sql1--][span style=\'color:blue;font-weight:bold\']SELECT[/span] [color=blue]SUM[/color](hours) [color=green]AS[/color] total [color=green]FROM[/color] [color=orange]tablename[/color] [!--sql2--][/div][!--sql3--]
[/quote]

Where do you write this? In the query section of the recordset or the dynamic text?

Thanks

EDIT: Doesn't matter. Sorted.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.