|
|
|
select SUM แล้วเอาที่ SUM มาเป็นบวกอีกทีทำยังงัยค่ะ |
|
|
|
|
|
|
|
แบบนี่อะป่าว
Code (PHP)
<? $query4 = "SELECT sum(amount) AS punch FROM tb_money ";
$result4 = mysql_query($query4) or die(mysql_error());
while($row4=mysql_fetch_array($result4)){
echo $row4['punch'];
}
?>
|
|
|
|
|
Date :
2011-05-06 16:38:13 |
By :
chonburi f.c |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
select sum(a) , sum(b) , sum(amount)
from ..........
group by sales_date
|
|
|
|
|
Date :
2011-05-22 14:12:36 |
By :
Unidentifier |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ขอแก้ไขนิดนึงครับ
select sum(a) , sum(b) , sum(amount)
from ..........
group by sales_date,`type`
|
|
|
|
|
Date :
2011-05-23 09:19:34 |
By :
Unidentifier |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
select `type` ,sum(num) , sum(amount)
from ..........
group by sales_date,`type`
|
|
|
|
|
Date :
2011-05-23 09:23:04 |
By :
Unidentifier |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 05
|