From 60b322956e7d0b0e2fc88479a1a94fa83c63c6dd Mon Sep 17 00:00:00 2001 From: Mike Beck Date: Mon, 12 Aug 2002 16:07:36 +0000 Subject: [PATCH] Bugfix: create IS NULL instead of IS 'NULL' --- ChangeLog | 5 ++++- tbl_select.php3 | 10 +++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 327307a7c..ab4a68922 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ phpMyAdmin - Changelog $Id$ $Source$ +2002-08-12 Mike Beck + * tbl_select.php3: Bugfix: it created IS 'NULL' + instead of IS NULL 2002-08-12 Alexander M. Turek * 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/ \ No newline at end of file diff --git a/tbl_select.php3 b/tbl_select.php3 index 0536e9152..6b7f2704b 100755 --- a/tbl_select.php3 +++ b/tbl_select.php3 @@ -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 { } -?> +?> \ No newline at end of file