noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 86/162: Code cleaning : remove SQL with hardc


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 86/162: Code cleaning : remove SQL with hardcoded value
Date: Sat, 11 Jul 2020 13:23:45 -0400 (EDT)

sparkyx pushed a commit to annotated tag E-4
in repository noalyss.

commit b71c39b99a60628b7c3acf69b48a4626193e93de
Author: Dany De Bontridder <danydb@noalyss.eu>
AuthorDate: Wed Nov 7 13:00:06 2018 +0100

    Code cleaning : remove SQL with hardcoded value
---
 include/class/acc_reconciliation.class.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/class/acc_reconciliation.class.php 
b/include/class/acc_reconciliation.class.php
index dc7270d..e900f59 100644
--- a/include/class/acc_reconciliation.class.php
+++ b/include/class/acc_reconciliation.class.php
@@ -244,10 +244,10 @@ j1.j_poste as poste
      */
     function get ( )
     {
-        $sql=" select jr_id as cn from jrn_rapt where 
jra_concerned=".$this->jr_id.
-             " union ".
-             " select jra_concerned as cn from jrn_rapt where 
jr_id=".$this->jr_id;
-        $Res=$this->db->exec_sql($sql);
+        $sql=" select jr_id as cn from jrn_rapt where jra_concerned=$1
+              union 
+              select jra_concerned as cn from jrn_rapt where jr_id=$2";
+        $Res=$this->db->exec_sql($sql,array($this->jr_id,$this->jr_id));
 
         // If nothing is found return null
         $n=Database::num_row($Res);



reply via email to

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