2 /*=====================================================================*\
3 || ###################################################################
4 || # Iris Studios Shared Object Framework [#]version[#]
5 || # Copyright ©2002-[#]year[#] Iris Studios, Inc.
7 || # This program is free software; you can redistribute it and/or modify
8 || # it under the terms of the GNU General Public License as published by
9 || # the Free Software Foundation; version [#]gpl[#] of the License.
11 || # This program is distributed in the hope that it will be useful, but
12 || # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 || # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 || # You should have received a copy of the GNU General Public License along
17 || # with this program; if not, write to the Free Software Foundation, Inc.,
18 || # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 || ###################################################################
20 \*=====================================================================*/
23 * MySQLi Database Abstraction Layer
29 $this->load('db', null
);
32 * MySQLi Database Abstraction Layer
34 * This framework is a function wrapper for MySQLi functions so we can have
35 * better error reporting and query reporting.
37 * @author Iris Studios, Inc.
38 * @copyright Copyright ©2002 - [#]year[#], Iris Studios, Inc.
43 class DB_MySQLi
extends DB_Abstract
46 * Command mapping list
49 var $commands = array(
50 'pconnect' => '$this->command_mysqli_connect',
51 'connect' => '$this->command_mysqli_connect',
52 'query' => 'mysqli_query',
53 'error_num' => 'mysqli_errno',
54 'error_str' => 'mysqli_error',
55 'escape_string' => 'mysqli_real_escape_string',
56 'fetch_assoc' => 'mysqli_fetch_assoc',
57 'fetch_object' => 'mysqli_fetch_object',
58 'free_result' => 'mysqli_free_result',
59 'insert_id' => 'mysqli_insert_id',
60 'num_rows' => 'mysqli_num_rows',
61 'affected_rows' => 'mysqli_affected_rows'
64 // ###################################################################
68 function __construct(&$registry)
70 parent
::__construct($registry);
73 // ###################################################################
77 function DB_MySQL(&$registry)
79 $this->__construct($registry);
82 // ###################################################################
84 * Wrapper: mysqli_connect
88 * @param string Server name
89 * @param string User name
90 * @param string Password
91 * @param string Database
93 * @return integer DB-Link
95 function command_mysqli_connect($server, $user, $password, $database)
97 return mysqli_connect($server, $user, $password, $database);
101 /*=====================================================================*\
102 || ###################################################################
105 || ###################################################################
106 \*=====================================================================*/