phpcompta-dev
[Top][All Lists]
Advanced

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

[Phpcompta-dev] r5017 - phpcompta/trunk/include


From: phpcompta-dev
Subject: [Phpcompta-dev] r5017 - phpcompta/trunk/include
Date: Wed, 27 Jun 2012 13:10:52 +0200 (CEST)

Author: danydb
Date: 2012-06-27 13:10:52 +0200 (Wed, 27 Jun 2012)
New Revision: 5017

Modified:
   phpcompta/trunk/include/class_acc_account_ledger.php
Log:
Bug due to PSQL 9.0 data must be casted

Modified: phpcompta/trunk/include/class_acc_account_ledger.php
===================================================================
--- phpcompta/trunk/include/class_acc_account_ledger.php        2012-06-27 
11:04:30 UTC (rev 5016)
+++ phpcompta/trunk/include/class_acc_account_ledger.php        2012-06-27 
11:10:52 UTC (rev 5017)
@@ -563,18 +563,18 @@
                 if ( strstr($item_cred,"*") == true )
                 {
                     $item_cred=strtr($item_cred,"*","%");
-                    $SqlItem="$or pcm_val::text like '$item_cred'";
+                    $SqlItem="$or pcm_val::text like 
'".sql_string($item_cred)."'";
                     $or="  or ";
                 }
                 else
                 {
-                    $SqlItem="$or pcm_val::text = '$item_cred' ";
+                    $SqlItem="$or pcm_val::text = '".sql_string($item_cred)."' 
";
                     $or="  or ";
                 }
                 $SqlFilter=$SqlFilter.$SqlItem;
             }
         }//foreach
-        $sql.=$SqlFilter.' and pcm_val::text='.$this->id;
+        $sql.=$SqlFilter." and pcm_val::text='".sql_string($this->id)."'";
         $max=$this->db->get_value($sql);
         if ($max > 0 )
             return 0;



---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu



reply via email to

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