[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 03/04: Code cleaning : remove SQL with hardco
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 03/04: Code cleaning : remove SQL with hardcoded value |
Date: |
Wed, 7 Nov 2018 11:30:34 -0500 (EST) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit b71785ff63b34c68a788273870814e8c4d7c8ff3
Author: Dany De Bontridder <address@hidden>
Date: 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);
- [Noalyss-commit] [noalyss] branch master updated (608c564 -> 6a40e87), Dany De Bontridder, 2018/11/07
- [Noalyss-commit] [noalyss] 02/04: adapt to 7.2 ,array, Dany De Bontridder, 2018/11/07
- [Noalyss-commit] [noalyss] 01/04: adapt to 7.2 ,array, Dany De Bontridder, 2018/11/07
- [Noalyss-commit] [noalyss] 03/04: Code cleaning : remove SQL with hardcoded value,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 04/04: constant.php , clean ini_set, Dany De Bontridder, 2018/11/07