photoshop cs5 official Chinese official original download PHP daily, weekly, monthly click ranking statistics

WBOY
Release: 2016-07-29 08:47:41
Original
943 people have browsed it

Copy the code The code is as follows:


$now=time(); //Current time
$StrUpdate = "Update $tbl_article set hits=hits+1";
if(date("d",$ lasthittime)==date("d",$now)){//Same day
$StrUpdate = $StrUpdate.",dayhits = dayhits+1";
}else{
$StrUpdate = $StrUpdate.",dayhits = 0";
}
if(date("W",$lasthittime)==date("W",$now)){//Same week
$StrUpdate = $StrUpdate.",weekhits = weekhits+1";
}else{
$StrUpdate = $StrUpdate.",weekhits = 0";
}
if(date("m",$lasthittime)==date("m",$now)){//Same month
$StrUpdate = $StrUpdate.",monthhits = monthhits+1";
}else{
$StrUpdate = $StrUpdate.",monthhits = 0";
}
$StrUpdate = $StrUpdate.",lasthittime='$now' where"; //Update click time
$fsql->query($StrUpdate);


I don’t know if it’s easy to use, I’ll analyze it first. But it feels like there are some problems. If it’s the day, you should first judge the year. The months are all the same, and then we judge the day.
The above introduces the photoshop cs5 official Chinese official original download PHP daily, weekly, and monthly click ranking statistics, including the content of photoshop cs5 official Chinese official original download. I hope it will be helpful to friends who are interested in PHP tutorials.

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!