index : archweb32 | |
Archlinux32 website | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-06-25 14:15:49 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-06-25 14:15:49 +0200 |
commit | e75fcbfde823568d0202761c3e099afddf901028 (patch) | |
tree | 52ce12dd658dbecc01e7613c18bf3d792109744d /lib | |
parent | 598b1de52fe07b02fb0f6ec90da06429954a2027 (diff) |
-rw-r--r-- | lib/mysql.php | 7 |
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) || |