PHP School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a PHP Expert!

Join 307,146 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,735 people online right now. Registration is fast and FREE... Join Now!




work with matematics function in mysql

 

work with matematics function in mysql

xsufi3

4 Nov, 2009 - 05:55 AM
Post #1

New D.I.C Head
*

Joined: 24 Oct, 2009
Posts: 4


My Contributions
first of all, I appologize about my last post, I ask weird Q ...

so, still the same code from before, I want to sum one column but minus a few of those... form my table

CODE


$sql="SELECT SUM( api_total ) AS valuenttotal, COUNT(*) AS casestotal FROM
api LEFT JOIN agent ON agent.agen_no = api.api_ageno LEFT JOIN grup ON
agent.agen_leader = grup.group_kode_ag WHERE agent.agen_leader='$nama'
GROUP BY group_name";
        $dbs->sql_query($sql);
        if ($dbs->sql_numrows()) {
            while($dbs->next()) {
                $valuenttotal=number_format($dbs->rows('valuenttotal'), 0, ' ', '.');
                $casestotal=$dbs->rows('casestotal');
                
                }
        }else{
            $valuenttotal=0;
            $casestotal=0;
        }




I'm out of idea...

Have U have some better ideas ....

thx Bro

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 03:49PM

Live PHP Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month