Index: temp/trunk/data/module/DB/common.php
===================================================================
--- temp/trunk/data/module/DB/common.php	(revision 4700)
+++ temp/trunk/data/module/DB/common.php	(revision 5887)
@@ -1001,5 +1001,10 @@
         foreach ($data as $value) {
             if ($this->prepare_types[$stmt][$i] == DB_PARAM_SCALAR) {
-                $realquery .= $this->quoteSmart($value);
+				if ($value != "") {
+					$realquery .= $this->quoteSmart($value);
+				}else{
+					$realquery .= NULL;
+				}
+				print("DB_PARAM_SCALAR");
             } elseif ($this->prepare_types[$stmt][$i] == DB_PARAM_OPAQUE) {
                 $fp = @fopen($value, 'rb');
