특정날짜 방문자 추출
<?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와 관련된 팁을 여러분들과 함께 공유하세요.
나누면 즐거움이 커집니다.
나누면 즐거움이 커집니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 3149 | 12년 전 | 11350 | ||
| 3148 | 12년 전 | 12513 | ||
| 3147 | 12년 전 | 4347 | ||
| 3146 | 12년 전 | 11159 | ||
| 3145 |
takumi22
|
12년 전 | 11254 | |
| 3144 | 12년 전 | 5483 | ||
| 3143 | 12년 전 | 10371 | ||
| 3142 | 12년 전 | 9630 | ||
| 3141 | 12년 전 | 4368 | ||
| 3140 | 12년 전 | 3471 | ||
| 3139 |
adm1n
|
12년 전 | 5266 | |
| 3138 | 12년 전 | 6397 | ||
| 3137 | 12년 전 | 5645 | ||
| 3136 |
izabella
|
12년 전 | 6442 | |
| 3135 |
|
12년 전 | 5889 | |
| 3134 |
|
12년 전 | 5070 | |
| 3133 | 12년 전 | 6602 | ||
| 3132 | 12년 전 | 14645 | ||
| 3131 | 12년 전 | 7375 | ||
| 3130 | 12년 전 | 5397 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기