Jump to content

PHP Maths


metrostars

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.
Link to comment
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--]
Link to comment
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.