새로운것을 짜고있네요.
x일 동안 인기순위
x일 동안 다운로드 순위
부하를 줄이기 위해 특정 시간마다 json을 생성하고 파싱해오는식으로 짜고있네요~
{
"download": [
{ "no": "1", "bo_table": ["free"], "wr_id": ["7"], "datetime": ["2012-07-24"], "count": ["1"] },
],
"view": [
{ "no": "27", "bo_table": ["free"], "wr_id": ["2"], "datetime": ["2012-07-25"], "count": ["3"] },
{ "no": "20", "bo_table": ["free"], "wr_id": ["3"], "datetime": ["2012-07-25"], "count": ["3"] },
{ "no": "12", "bo_table": ["free"], "wr_id": ["4"], "datetime": ["2012-07-25"], "count": ["3"] },
{ "no": "15", "bo_table": ["free"], "wr_id": ["5"], "datetime": ["2012-07-25"], "count": ["3"] },
{ "no": "4", "bo_table": ["free"], "wr_id": ["6"], "datetime": ["2012-07-24"], "count": ["1"] },
{ "no": "14", "bo_table": ["free"], "wr_id": ["6"], "datetime": ["2012-07-25"], "count": ["2"] },
{ "no": "8", "bo_table": ["free"], "wr_id": ["7"], "datetime": ["2012-07-24"], "count": ["1"] },
{ "no": "35", "bo_table": ["free"], "wr_id": ["7"], "datetime": ["2012-07-25"], "count": ["2"] },
{ "no": "6", "bo_table": ["free"], "wr_id": ["8"], "datetime": ["2012-07-24"], "count": ["1"] },
{ "no": "13", "bo_table": ["free"], "wr_id": ["8"], "datetime": ["2012-07-25"], "count": ["3"] },
{ "no": "5", "bo_table": ["free"], "wr_id": ["9"], "datetime": ["2012-07-24"], "count": ["1"] },
{ "no": "22", "bo_table": ["free"], "wr_id": ["9"], "datetime": ["2012-07-25"], "count": ["3"] },
{ "no": "2", "bo_table": ["free"], "wr_id": ["11"], "datetime": ["2012-07-24"], "count": ["2"] },
{ "no": "26", "bo_table": ["free"], "wr_id": ["11"], "datetime": ["2012-07-25"], "count": ["4"] },
]
}
|
댓글을 작성하시려면 로그인이 필요합니다.
로그인
댓글 10개
php에서 json 파일 불어와 참조하는게 따로 있나요?
제가 쓰기 편하게 배열을 짰구요.
php에서 json을 불러와 씁니다.
예를 들어 위 내용중 view->bo_table값을 참조할 때의
모양새를 말하고 있습니다 ㅋㅋ
예, 맞습니다.
bo_table 은 게시판이고.
wr_id는 게시글 테이블 코드
datetime는 다운 혹은 view한 날짜
count는 같은 날짜에 같은 게시판에 같은 wr_id 의 게시판에서 다운또는 히트한 숫자입니다.