You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
602 B

<?php
/*
*
* @copyright (c) 2011 animegame.eu
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
* @author hecht
*/
function silent_query($sql) {
return mysqli_query($GLOBALS['main_db'], $sql);
}
function db_query($sql) {
$qry = mysqli_query($GLOBALS['main_db'], $sql);
if(!$qry) {
echo $sql . '<br>';
die('Query failed: '
.'<li>errorno='.mysqli_errno($GLOBALS['main_db'])
.'<li>error='.mysqli_error($GLOBALS['main_db'])
.'<li>query='.$query);
}
return $qry;
}
function db_affected_rows() {
return mysqli_affected_rows($GLOBALS['main_db']);
}