[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 17/323: query is prepared twice and cannot be
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 17/323: query is prepared twice and cannot be called only once |
Date: |
Wed, 14 Mar 2018 17:38:10 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 96619d2bee3e5b2c8ccd0423c85fa2efbdc4347b
Author: Dany De Bontridder <address@hidden>
Date: Sat Jan 6 21:29:40 2018 +0100
query is prepared twice and cannot be called only once
---
include/class/acc_reconciliation.class.php | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/class/acc_reconciliation.class.php
b/include/class/acc_reconciliation.class.php
index 8d815a8..4f3f5a3 100644
--- a/include/class/acc_reconciliation.class.php
+++ b/include/class/acc_reconciliation.class.php
@@ -287,7 +287,6 @@ j1.j_poste as poste
$this->jr_id=$array[$i]['jr_id'];
$ret[$i]['first']=$this->fill_info();
}
- $this->db->prepare('detail_quant','select * from v_quant_detail where
jr_id=$1');
return $ret;
}
/**
@@ -367,6 +366,7 @@ j1.j_poste as poste
$array=$this->get_reconciled();
$ret=array();
bcscale(2);
+ $this->prepare_query_detail_quant();
for ($i=0;$i<count($array);$i++)
{
$retdb=$this->db->execute("detail_quant",array($array[$i]['first']['jr_id']));
@@ -613,7 +613,10 @@ j1.j_poste as poste
}
function prepare_query_detail_quant()
{
+ static $seen=0;
+ if ( $seen == 1) return;
$this->db->prepare('detail_quant','select * from v_quant_detail where
jr_id=$1');
+ $seen=1;
}
/**
* Retrieve the amount VAT included and autoreversed VAT excluded thanks
- [Noalyss-commit] [noalyss] branch master updated (689dfc2 -> 2711cee), Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 02/323: script.js : code cleaning, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 01/323: Fix problem with invalid unicode sequence, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 06/323: Fix : is now protected instead of private, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 09/323: Data_SQL : add doxygen doc, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 08/323: Data_SQL : add doxygen doc, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 07/323: Acc_Plan_MTable : add doxygen doc, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 11/323: redirect incorrect : fix small bug, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 13/323: Add Documentation, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 18/323: cosmetic , add a button close for warning, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 17/323: query is prepared twice and cannot be called only once,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 05/323: Fix : script failed due to the lack of search_path, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 10/323: Acc_Plan_SQL : add doxygen doc, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 14/323: Update Doxyfile : version nb, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 15/323: Fix problem with font OpenSans, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 19/323: Task #1516 : Module période : add icon for closing / opening, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 12/323: Rewriting periode : add format date + exception, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 24/323: use calcy instead of computing the scroll, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 20/323: Add documentation , code rewriting : use of title_box, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 25/323: Task#1461 : nombre de fiches dans catégorie, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 27/323: set_jrn in deprecated and replaced by set_ledger, Dany De Bontridder, 2018/03/14