관리자: 변수 상수 제외 홑따옴표
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
<?
|
||||
$tmp_sql = " select count(*) as cnt from {$g4['login_table']} where lo_ip = '{$_SERVER['REMOTE_ADDR']}' ";
|
||||
$tmp_row = sql_fetch($tmp_sql);
|
||||
//sql_query(" lock table $g4[login_table] write ", false);
|
||||
//sql_query(" lock table $g4['login_table'] write ", false);
|
||||
if ($tmp_row['cnt'])
|
||||
{
|
||||
$tmp_sql = " update {$g4['login_table']} set mb_id = '{$member['mb_id']}', lo_datetime = '{$g4['time_ymdhis']}', lo_location = '$lo_location', lo_url = '$lo_url' where lo_ip = '{$_SERVER['REMOTE_ADDR']}' ";
|
||||
@ -22,8 +22,8 @@ else
|
||||
sql_query(" delete from {$g4['login_table']} where lo_datetime < '".date("Y-m-d H:i:s", $g4['server_time'] - (60 * $config['cf_login_minutes']))."' ");
|
||||
|
||||
// 부담(overhead)이 있다면 테이블 최적화
|
||||
//$row = sql_fetch(" SHOW TABLE STATUS FROM `$mysql_db` LIKE '$g4[login_table]' ");
|
||||
//if ($row['Data_free'] > 0) sql_query(" OPTIMIZE TABLE $g4[login_table] ");
|
||||
//$row = sql_fetch(" SHOW TABLE STATUS FROM `$mysql_db` LIKE '$g4['login_table']' ");
|
||||
//if ($row['Data_free'] > 0) sql_query(" OPTIMIZE TABLE $g4['login_table'] ");
|
||||
}
|
||||
//sql_query(" unlock tables ", false);
|
||||
?>
|
||||
Reference in New Issue
Block a user