[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 66/323: Database : add function is_prepare()
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 66/323: Database : add function is_prepare() to check if pg_prepare has already run |
Date: |
Wed, 14 Mar 2018 17:38:19 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 2e40252b7765b0095fba640f3951240870b6fc60
Author: Dany De Bontridder <address@hidden>
Date: Sun Jan 21 13:56:31 2018 +0100
Database : add function is_prepare() to check if pg_prepare has already run
---
include/lib/database.class.php | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/include/lib/database.class.php b/include/lib/database.class.php
index 393b6dc..edddef6 100644
--- a/include/lib/database.class.php
+++ b/include/lib/database.class.php
@@ -1156,6 +1156,17 @@ class Database
$this->lo_unlink($a_lob[$i]['oid']);
}
}
+ /**
+ * Check if a prepared statement already exists or not
+ * @param string $query_name name of the prepared query
+ * @return boolean false is not yet prepared
+ */
+ function is_prepare($query_name)
+ {
+ $nb_prepared=$this->get_value("select count(*) from
pg_prepared_statements where name=$1",[$query_name]);
+ if ( $nb_prepared==0)return FALSE;
+ return TRUE;
+ }
}
- [Noalyss-commit] [noalyss] 34/323: Rewriting Module Template Category of card, (continued)
- [Noalyss-commit] [noalyss] 34/323: Rewriting Module Template Category of card, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 53/323: Bug : search cannot select ledger, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 47/323: Task #0001519: Assouplissement de la sécurité : Administrateur accès à tout, ajout d'utilisateur par défaut securité désactivée, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 72/323: typo, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 64/323: th.num align right, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 55/323: Task #1457 & 1281 : export PDF with opening writing, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 54/323: Task #1326 & #1512 = ajout détail extourne, libellé directement après ajout opération, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 57/323: Task #0001527: Effacement du champ code fiche : bouton , indent, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 63/323: Task #0001529: Icon_Action missing, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 62/323: Merge branch 'master' of ssh://ns3/srv/git/noalyss, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 66/323: Database : add function is_prepare() to check if pg_prepare has already run,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 48/323: Task #1520 : Préférence : pouvoir changer les préférence pour les exports CSV, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 59/323: Task #0001529: Réécriture de code , placer les icones dans Icon_Action, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 45/323: Task #0001519: Assouplissement de la sécurité : journaux et actions, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 77/323: Small bug in clean card, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 69/323: Task #0001530: Réécriture PRINTJRN : export PDF, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 80/323: before deleting a card , check if it is not used as an attribute in another card, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 78/323: esthetic, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 70/323: Task #0001530: Réécriture PRINTJRN : export CSV : Purchase List (L), Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 73/323: Missing import of icon_action, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 75/323: Merge branch 'rewrite-printjrn', Dany De Bontridder, 2018/03/14