Bugfix: create IS NULL instead of IS 'NULL'

This commit is contained in:
Mike Beck
2002-08-12 16:07:36 +00:00
parent 6f6a9e990e
commit 60b322956e
2 changed files with 9 additions and 6 deletions

View File

@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
$Id$
$Source$
2002-08-12 Mike Beck <mikebeck@users.sourceforge.net>
* tbl_select.php3: Bugfix: it created IS 'NULL'
instead of IS NULL
2002-08-12 Alexander M. Turek <rabus@users.sourceforge.net>
* libraries/defines_php.lib.php3, Documentation.*, translators.html:
corrected version number.
@@ -1587,4 +1590,4 @@ $Source$
--- Older ChangeLogs can be found on our project website ---
http://www.phpmyadmin.net/ChangeLogs/
http://www.phpmyadmin.net/ChangeLogs/

View File

@@ -195,15 +195,15 @@ else {
$sql_query .= ' WHERE 1';
for ($i = 0; $i < count($fields); $i++) {
if (!empty($fields) && $fields[$i] != '') {
if (strtoupper($fields[$i]) == 'NULL' || strtoupper($fields[$i]) == 'NOT NULL') {
$quot = '';
$func[$i] = 'IS';
}
if (eregi('char|blob|text|set|enum|date|time|year', $types[$i])) {
$quot = '\'';
} else {
$quot = '';
}
if (strtoupper($fields[$i]) == 'NULL' || strtoupper($fields[$i]) == 'NOT NULL') {
$quot = '';
$func[$i] = 'IS';
}
$sql_query .= ' AND ' . PMA_backquote(urldecode($names[$i])) . " $func[$i] $quot$fields[$i]$quot";
} // end if
} // end for
@@ -221,4 +221,4 @@ else {
}
?>
?>