$results=mysql_query("SELECT count(*) as total FROM new where date>'$date' and erisim='1' group by date_format(tarih,'%Y-%m') ");
$array=mysql_fetch_array($results,MYSQL_ASSOC);
echo $array[''];
我应该在$ array ['']内填写什么才能获得每月的计数值?
答案 0 :(得分:6)
$results=mysql_query("SELECT count(*) as Total FROM new where year(date)='$ss' and erisim='1' group by date_format(tarih,'%Y-%m') ");
while ($row = mysql_fetch_array($results, MYSQL_ASSOC)) {
echo $row["Total"] ;
}