Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/mysql.php
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-06-25 14:15:49 +0200
committerErich Eckner <git@eckner.net>2018-06-25 14:15:49 +0200
commite75fcbfde823568d0202761c3e099afddf901028 (patch)
tree52ce12dd658dbecc01e7613c18bf3d792109744d /lib/mysql.php
parent598b1de52fe07b02fb0f6ec90da06429954a2027 (diff)
lib/mysql.php: mysql_prepare_query() new (but not (yet) needed)
Diffstat (limited to 'lib/mysql.php')
-rw-r--r--lib/mysql.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/mysql.php b/lib/mysql.php
index 60bfa3a..8255b33 100644
--- a/lib/mysql.php
+++ b/lib/mysql.php
@@ -19,6 +19,13 @@ function mysql_run_query($query) {
return $result;
}
+function mysql_prepare_query($query) {
+ global $mysql;
+ if ( ! $result = $mysql -> prepare($query) )
+ die_500( "Prepare failed: " . $mysql -> error );
+ return $result;
+}
+
function show_warning_on_offline_slave() {
$result = mysql_run_query("SHOW STATUS LIKE \"Slave_running\"");
if (($result -> num_rows == 0) ||