fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [9025] property: datatype in query


From: Sigurd Nes
Subject: [Fmsystem-commits] [9025] property: datatype in query
Date: Thu, 22 Mar 2012 09:43:46 +0000

Revision: 9025
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9025
Author:   sigurdne
Date:     2012-03-22 09:43:45 +0000 (Thu, 22 Mar 2012)
Log Message:
-----------
property: datatype in query

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

Modified: trunk/property/inc/class.sos_agreement.inc.php
===================================================================
--- trunk/property/inc/class.sos_agreement.inc.php      2012-03-22 08:41:58 UTC 
(rev 9024)
+++ trunk/property/inc/class.sos_agreement.inc.php      2012-03-22 09:43:45 UTC 
(rev 9025)
@@ -392,11 +392,15 @@
                                        {
                                                
if($this->db->f('datatype')=='V' || $this->db->f('datatype')=='email' || 
$this->db->f('datatype')=='CH')
                                                {
-                                                       $query_arr[]= 
"$entity_table." . $this->db->f('column_name') . " $this->like '%$query%'";
+                                                       $query_arr[]= 
"$entity_table." . $this->db->f('column_name') . " {$this->like} '%{$query}%'";
                                                }
+                                               else 
if($this->db->f('datatype')=='I')
+                                               {
+                                                       $query_arr[]= 
"$entity_table." . $this->db->f('column_name') . ' = ' . (int)$query;
+                                               }
                                                else
                                                {
-                                                       $query_arr[]= 
"$entity_table." . $this->db->f('column_name') . " = '$query'";
+                                                       $query_arr[]= 
"$entity_table." . $this->db->f('column_name') . " = '{$query}'";
                                                }
                                        }
 




reply via email to

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