fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [16350] filter on null-values


From: sigurdne
Subject: [Fmsystem-commits] [16350] filter on null-values
Date: Mon, 20 Feb 2017 09:26:35 -0500 (EST)

Revision: 16350
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16350
Author:   sigurdne
Date:     2017-02-20 09:26:35 -0500 (Mon, 20 Feb 2017)
Log Message:
-----------
filter on null-values

Modified Paths:
--------------
    trunk/property/inc/class.soentity.inc.php

Modified: trunk/property/inc/class.soentity.inc.php
===================================================================
--- trunk/property/inc/class.soentity.inc.php   2017-02-20 13:16:57 UTC (rev 
16349)
+++ trunk/property/inc/class.soentity.inc.php   2017-02-20 14:26:35 UTC (rev 
16350)
@@ -759,7 +759,7 @@
                                                                if 
(ctype_digit($query) && !$criteria_id)
                                                                {
 //                                                                     
$_querymethod[] = "CAST( json_representation->>'". $this->db->f('column_name') 
."' AS integer) = " .(int)$query;
-                                                                       
$_querymethod[] = "json_representation->>'". $this->db->f('column_name') ."'  
{$this->like} '" .(int)$query . "%'";
+                                                                       
$_querymethod[] = "CAST(json_representation->>'". $this->db->f('column_name') . 
"'AS text)  {$this->like} '" .(int)$query . "%'";
                                                                        
$__querymethod = array(); // remove block
                                                                }
                                                                break;
@@ -853,7 +853,7 @@
                                        {
                                                if(!empty($attibute['choice']))
                                                {
-                                                       $_querymethod_status = 
"(json_representation->>'status' IS NULL OR CAST( 
json_representation->>'status' AS integer) < 90)";
+                                                       $_querymethod_status = 
"(json_representation->>'status' IS NULL OR 
NULLIF(json_representation->>'status', '')::numeric < 90)";
                                                }
                                        }
                                }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]