o.k o.k ive thrown together this code Inwich DOES work but i have 4 Colombs i need to get this value for and then Sum the bstotals in a sum right now i have this SAME routine but just changing the name of (" btstotal ") to bstotal1 , bstotal2 , bstotal3 so my code in diffrent area's looks like this $sql = "SELECT SUM(ElecRem) as btstotal FROM orders "; $sql = "SELECT SUM(ProjRem) as btstotal1 FROM orders "; $sql = "SELECT SUM(ProjRem) as btstotal2 FROM orders "; in another area how can i sum up the diffrent bstotals ??? like bstotalsum = ('bstotal + bstotal1 + bstotal2'); ?????



/// <---------------MAIN CODE---------------->>
<?php
$link = mysql_connect("localhost","root","goobers") or die(mysql_error());
              mysql_select_db("workorder", $link);
        $sql = "SELECT SUM(ElecRem) as btstotal FROM orders ";
  $result = mysql_query($sql, $link) or die(mysql_error());
  while ($row = mysql_fetch_assoc($result)) {
      extract($row);
  }
  echo '<h9><font color="#00FF00">' . $btstotal . '</h9>';
  mysql_free_result($result) or die(mysql_error());
  mysql_close($link) or die(mysql_error());

?>

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to