특정날짜 방문자 추출
<?php
function date_visit($Number,$Type){
if($Type == 0){
$Row_Sum = sql_fetch(" select * from g4_visit_sum where vs_date = '".date("Y-m-d",strtotime("-".$Number." day"))."' ");
return $Row_Sum['vs_count'];
}else if($Type == 1){
$Row_Sum = sql_fetch(" select sum(vs_count) as vs_count from g4_visit_sum ");
return $Row_Sum['vs_count'];
}
}
echo date_visit(0,1);
?>
echo date_visit(3,0);
// 3일전 방문자 출력
echo date_visit(3,1);
// 두번째 1이 들어가면 전체 방문자 출력이므로 3은 무시됩니다.
function date_visit($Number,$Type){
if($Type == 0){
$Row_Sum = sql_fetch(" select * from g4_visit_sum where vs_date = '".date("Y-m-d",strtotime("-".$Number." day"))."' ");
return $Row_Sum['vs_count'];
}else if($Type == 1){
$Row_Sum = sql_fetch(" select sum(vs_count) as vs_count from g4_visit_sum ");
return $Row_Sum['vs_count'];
}
}
echo date_visit(0,1);
?>
echo date_visit(3,0);
// 3일전 방문자 출력
echo date_visit(3,1);
// 두번째 1이 들어가면 전체 방문자 출력이므로 3은 무시됩니다.
게시판 목록
그누4 팁자료실
그누보드4와 관련된 팁을 여러분들과 함께 공유하세요.
나누면 즐거움이 커집니다.
나누면 즐거움이 커집니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 3209 | 12년 전 | 4911 | ||
| 3208 |
Header
|
12년 전 | 3245 | |
| 3207 |
Header
|
12년 전 | 2860 | |
| 3206 |
Header
|
12년 전 | 4323 | |
| 3205 |
Header
|
12년 전 | 3868 | |
| 3204 |
Header
|
12년 전 | 6046 | |
| 3203 |
Header
|
12년 전 | 3246 | |
| 3202 | 12년 전 | 4491 | ||
| 3201 | 12년 전 | 4766 | ||
| 3200 | 12년 전 | 4387 | ||
| 3199 | 12년 전 | 5054 | ||
| 3198 |
|
12년 전 | 4940 | |
| 3197 |
|
12년 전 | 4690 | |
| 3196 | 12년 전 | 5066 | ||
| 3195 |
|
12년 전 | 4373 | |
| 3194 | 12년 전 | 4453 | ||
| 3193 | 12년 전 | 10840 | ||
| 3192 | 12년 전 | 9495 | ||
| 3191 | 12년 전 | 5144 | ||
| 3190 | 12년 전 | 8503 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기