1
0
mirror of https://github.com/kremalicious/krtmn.git synced 2024-12-22 17:23:33 +01:00
krtmn/includes/ezSQL/ez_sql_mysqli_yourls.php

42 lines
753 B
PHP
Raw Normal View History

2016-04-13 22:02:46 +02:00
<?php
class ezSQL_mysqli_YOURLS extends ezSQL_mysqli {
/**
* Return MySQL server version
*
* @since 1.7
*/
function mysql_version() {
return mysqli_get_server_info( $this->dbh ) ;
}
/**
* Comply to YOURLS debug mode
*
* @since 1.7.1
*/
function __construct( $user, $pass, $name, $host ) {
$this->show_errors = defined( 'YOURLS_DEBUG' ) && YOURLS_DEBUG;
parent::__construct( $user, $pass, $name, $host );
}
/**
* Perform mySQL query
*
* Added to the original function: logging of all queries
*
* @since 1.7
*/
function query( $query ) {
// Keep history of all queries
$this->debug_log[] = $query;
// Original function
return parent::query( $query );
}
}