From 6bede2fd229395f34c321a37efa2ea93e7b1a7ba Mon Sep 17 00:00:00 2001 From: Philip Häusler Date: Sun, 28 Dec 2014 13:44:56 +0100 Subject: harden the sql queries --- includes/mysqli_provider.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'includes/mysqli_provider.php') 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 @@ -170,6 +170,16 @@ function sql_escape($query) { return $sql_connection->real_escape_string($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. * -- cgit v1.2.3-70-g09d2