model 질문입니다..
- 김정규
- 0
- 2,618
- 글주소
- 05-31
$count = '';
$default = sql_fetch(" select * from test ");
$reset = "update test set count = '10' ";
$sqls = "select * from test ";
$count = $default['count'];
$day = date("d");
if($day%3 == 0){
$new = $default['count'] - 1;
$today = date('Y-m-d');
$update_sql = "update test set count = '$new', wdate='$today' where wdate != '$today' ";
sql_query($update_sql);
$default = sql_fetch($sqls);
$count = $default['count'];
}
if($day == 01){
sql_query($reset);
$default = sql_fetch($sqls);
$count = $default['count'];
}
echo $count;
이걸
ci보드화 해야하는데...... 도무지 감이 안잡힙니디ㅏ..
도와주세요..