summaryrefslogtreecommitdiff
path: root/includes/mysqli_provider.php
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2014-12-28 13:44:56 +0100
committerPhilip Häusler <msquare@notrademark.de>2014-12-28 13:44:56 +0100
commit6bede2fd229395f34c321a37efa2ea93e7b1a7ba (patch)
treea20c74d5bdddae9e1ec9a988e1ba468371a4a995 /includes/mysqli_provider.php
parenta6ab81b834fe91b0f0704a7db33e377c8dc63a23 (diff)
harden the sql queries
Diffstat (limited to 'includes/mysqli_provider.php')
-rw-r--r--includes/mysqli_provider.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/includes/mysqli_provider.php b/includes/mysqli_provider.php
index 9f4f1396..f141e0de 100644
--- a/includes/mysqli_provider.php
+++ b/includes/mysqli_provider.php
@@ -171,6 +171,16 @@ function sql_escape($query) {
}
/**
+ * Convert a boolean for mysql-queries.
+ *
+ * @param boolean $boolean
+ * @return string
+ */
+function sql_bool($boolean) {
+ return $boolean === true ? 'TRUE' : 'FALSE';
+}
+
+/**
* Count query result lines.
*
* @param string $query