<[EMAIL PROTECTED]> writes
>
>i have three Values in each row of my MySQL database, im needing to sum
>them in the table as they are displayed per Row ?? how do i do this ?
>
>Projectname Elecremain Controlremain otherremain
><?php ?>
> Project1 2300 1600
>250 <?php (Sum) ?>
> Project2 4300 600
>150 <?php (Sum) ?>
SELECT Elecremain, Controlremain, otherremain, Elecremain+Controlremain+
otherremain as total from mytable
Your use of the word sum may be confusing you here, the MySQL SUM()
function is for columns, not rows. Which is why I have used the name
"total"
--
Pete Clark
Free advertising for your website, business, or organisation at:
http://www.hotcosta.com/resources.php
The php_mysql group is dedicated to learn more about the PHP/MySQL web database possibilities through group learning.
YAHOO! GROUPS LINKS
- Visit your group "php_mysql" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
