【php开源代码栏目提醒】:网学会员为需要php开源代码的朋友们搜集整理了shop_stat_cat.php相关资料,希望对各位网友有所帮助!
<?
Function shop_stat_cat($cat_id){
$q=mysql_query("select * from stat_cat where cat_id='$cat_id' and day=now()");
if(!mysql_num_rows($q)){
mysql_query("insert into stat_cat (cat_id,views,day) values ('$cat_id','1',now())");
}else{
$a=mysql_fetch_array($q);
$id=$a["id"];
$views=$a["views"]+1;
mysql_query("update stat_cat set views='$views' where id='$id'");
}
}
?>
上一篇:
shop_show.php
下一篇:
顶棚装饰工程施工