]> git.nbdom.net Git - nb.git/commitdiff
lib/php/db/table.php
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Thu, 16 Mar 2017 12:26:29 +0000 (12:26 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Thu, 16 Mar 2017 12:26:29 +0000 (12:26 +0000)
lib/php/db/table.php

index 641b05e1efc865bda03685c7987bc8384765b533..ea9fa2558672c2d529abcd615a2bc428d5901125 100644 (file)
@@ -690,9 +690,10 @@ Class Table extends nb {
         $equal = ' '.($not ? 'NOT ' : '').$regexp.' ';
 
       // Text
-      } elseif (preg_match('/text|char|blob/',$field->type)
-        or ($v!='null' and !preg_match('/^\d+(\.\d*)?$/',$v)) # text criteria value
-      ) {
+# NB 16.03.17       } elseif (preg_match('/text|char|blob|date/',$field->type)
+# NB 16.03.17         or ($v!='null' and !preg_match('/^\d+(\.\d*)?$/',$v)) # text criteria value
+# NB 16.03.17       ) {
+      } elseif ($field->string()) {
 
         if (strtolower($v)=='null') $v = '';
         #$k = "COLAESCE($k,'')";