]> CyberLeo.Net >> Repos - Github/YOURLS.git/blob - includes/ezSQL/ez_sql_mysqli_yourls.php
More PHP7 fixes
[Github/YOURLS.git] / includes / ezSQL / ez_sql_mysqli_yourls.php
1 <?php
2
3 class ezSQL_mysqli_YOURLS extends ezSQL_mysqli {
4
5         /**
6          * Return MySQL server version
7          *
8          * @since 1.7
9          */
10         function mysql_version() {
11                 return  mysqli_get_server_info( $this->dbh ) ;
12         }
13     
14     /**
15      * Comply to YOURLS debug mode
16      *
17      * @since 1.7.1
18      */
19     function __construct( $user, $pass, $name, $host ) {
20         $this->show_errors = defined( 'YOURLS_DEBUG' ) && YOURLS_DEBUG;
21         parent::__construct( $user, $pass, $name, $host );
22     }
23         
24         /**
25          * Perform mySQL query
26          *
27          * Added to the original function: logging of all queries
28          *
29          * @since 1.7
30          */
31         function query( $query ) {
32         
33                 // Keep history of all queries
34                 $this->debug_log[] = $query;
35
36                 // Original function
37                 return parent::query( $query );
38         }
39         
40 }
41