日期:2014-05-17 浏览次数:20497 次
@mysql_connect("localhost","123","456");
@mysql_select_db("aa");
mysql_query("set names utf8");
$result=mysql_query("select cc from bb limit 0,500");
while($row=mysql_fetch_array($result)){
$ar[]=$row['cc'];
}
$cnt=count($ar);
for($i=0;$i<$cnt;$i++){
if($ar[$i]==9){
$b[]=$i;
}
}
$cnt_b=count($b);
if($cnt_b>0){
echo $cnt_b;
}else{
echo 0;
}
$result=mysql_query("select order_state from order limit 500");
$counter=0;
while($row=mysql_fetch_array($result)){
if($row[0]==9) $counter++;
}
echo $counter;