Completed fix against bug #575867. (I hope I did not break anything...)

This commit is contained in:
Alexander M. Turek
2002-07-02 17:45:36 +00:00
parent 133579b3f4
commit fe54411e96
2 changed files with 10 additions and 6 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$
$Source$
2002-07-01 Alexander M. Turek <rabus@users.sourceforge.net>
* sql.php3: Completed fix against bug #575867 (Error with limit or load in
the table name).
2002-07-01 Olivier L. M<>ller <om@omnis.ch>
* header.inc.php3: nicer CSS for Tabs (J.Fornallaz)
* tbl_properties.php3: added insert button to Marc's <select> :)

View File

@@ -599,14 +599,14 @@ require('./footer.inc.php3');
foreach ($res_words_arr as $w) {
// separate a backquoted expression with spaces
$pattern = "$w`([^`]*)`(.*)";
$replace = "$w `\\1` \\2";
$sql_str = eregi_replace($pattern, $replace, $sql_str);
$pattern = " $w`([^`]*)`(.*)";
$replace = " $w `\\1` \\2";
$sql_str = substr(eregi_replace($pattern, $replace, ' ' . $sql_str), 1);
// separate a parenthesized expression with spaces
$pattern = $pattern = "$w\(([^)]*)\)(.*)";
$replace = "$w (\\1) \\2";
$sql_str = eregi_replace($pattern, $replace, $sql_str);
$pattern = " $w\(([^)]*)\)(.*)";
$replace = " $w (\\1) \\2";
$sql_str = substr(eregi_replace($pattern, $replace, ' ' . $sql_str), 1);
// convert reservered words to upper case if not yet done
$sql_str = substr(eregi_replace(" $w ", " $w ", ' ' . $sql_str), 1);