如何在我的代码中使用echo?

时间:2012-08-03 08:40:04

标签: php mysql

    $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 ['']内填写什么才能获得每月的计数值?

1 个答案:

答案 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"] ;
 }