function xos_db_query($query, $link = 'db_link') { global ${$link}; if (defined('STORE_DB_TRANSACTIONS') && STORE_DB_TRANSACTIONS == 'true') { error_log('QUERY ' . $query . "\n", 3, STORE_PAGE_PARSE_TIME_LOG); } $result = mysqli_query(${$link}, $query) or xos_db_error($query, mysqli_errno(${$link}), mysqli_error(${$link})); return $result; }
function xos_db_query($query, $link = 'db_link') { global ${$link}, $logger; if (defined('STORE_DB_TRANSACTIONS') && STORE_DB_TRANSACTIONS == 'true') { if (!is_object($logger)) { $logger = new logger(); } $logger->write($query, 'QUERY'); } $result = mysqli_query(${$link}, $query) or xos_db_error($query, mysqli_errno(${$link}), mysqli_error(${$link})); return $result; }