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. 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--] 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. Link to comment https://forums.phpfreaks.com/topic/12801-php-maths/#findComment-49146 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.