metrostars Posted June 24, 2006 Share Posted June 24, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/12801-php-maths/ Share on other sites More sharing options...
Barand Posted June 24, 2006 Share Posted June 24, 2006 [!--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 Link to comment https://forums.phpfreaks.com/topic/12801-php-maths/#findComment-49061 Share on other sites More sharing options...
metrostars Posted June 24, 2006 Author Share Posted June 24, 2006 [!--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?ThanksEDIT: Doesn't matter. Sorted. Quote Link to comment https://forums.phpfreaks.com/topic/12801-php-maths/#findComment-49146 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.