sql_query 함수내 불필요한 코드 삭제
This commit is contained in:
@ -1577,10 +1577,6 @@ function sql_data_seek($result, $offset=0)
|
|||||||
mysql_data_seek($result, $offset);
|
mysql_data_seek($result, $offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
function _callback_sql_show_tables($m){
|
|
||||||
return "show tables like '".str_replace("`", "", $m[1])."'";
|
|
||||||
}
|
|
||||||
|
|
||||||
// mysqli_query 와 mysqli_error 를 한꺼번에 처리
|
// mysqli_query 와 mysqli_error 를 한꺼번에 처리
|
||||||
// mysql connect resource 지정 - 명랑폐인님 제안
|
// mysql connect resource 지정 - 명랑폐인님 제안
|
||||||
function sql_query($sql, $error=G5_DISPLAY_SQL_ERROR, $link=null)
|
function sql_query($sql, $error=G5_DISPLAY_SQL_ERROR, $link=null)
|
||||||
@ -1598,10 +1594,6 @@ function sql_query($sql, $error=G5_DISPLAY_SQL_ERROR, $link=null)
|
|||||||
// `information_schema` DB로의 접근을 허락하지 않습니다.
|
// `information_schema` DB로의 접근을 허락하지 않습니다.
|
||||||
$sql = preg_replace("#^select.*from.*where.*`?information_schema`?.*#i", "select 1", $sql);
|
$sql = preg_replace("#^select.*from.*where.*`?information_schema`?.*#i", "select 1", $sql);
|
||||||
|
|
||||||
if (preg_match("#^desc(?:ribe)?\s+(.*)#i", $sql)) {
|
|
||||||
$sql = preg_replace_callback("#^desc(?:ribe)?\s+(.*)#i", '_callback_sql_show_tables', trim($sql));
|
|
||||||
}
|
|
||||||
|
|
||||||
$is_debug = get_permission_debug_show();
|
$is_debug = get_permission_debug_show();
|
||||||
|
|
||||||
$start_time = $is_debug ? get_microtime() : 0;
|
$start_time = $is_debug ? get_microtime() : 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user