replaced space characters by the [[:space:]] POSIX expression

This commit is contained in:
Loïc Chapeaux
2002-02-08 18:04:35 +00:00
parent 1ebf4b003c
commit c2051a588f

View File

@@ -73,18 +73,19 @@ if (isset($btnDrop) || isset($navig)) {
// query may contain aliases.
// (todo: check for embedded comments...)
eregi('SELECT (.*)FROM +(`[^`]+`|[A-Za-z0-9_$]+)([\.]*)(`[^`]*`|[A-Za-z0-9_$]*)', $sql_query, $tmp);
eregi('SELECT[[:space:]](.*)[[:space:]]FROM[[:space:]]+(`[^`]+`|[A-Za-z0-9_$]+)([\.]*)(`[^`]*`|[A-Za-z0-9_$]*)', $sql_query, $tmp);
if ($tmp[3]=='.') {
if ($tmp[3] == '.') {
$prev_db = $db;
$db = str_replace('`','',$tmp[2]);
$reload = ($db == $prev_db)? 0 : 1;
$table = str_replace('`','',$tmp[4]);
$db = str_replace('`', '', $tmp[2]);
$reload = ($db == $prev_db) ? 0 : 1;
$table = str_replace('`', '', $tmp[4]);
}
else {
$table = str_replace('`','',$tmp[2]);
$table = str_replace('`', '', $tmp[2]);
}
/**
* Sets or modifies the $goto variable if required
*/