A lightweight extension of PHP's mysqli in which we provide a additional
error logging functionality and the ability to ask the connection what instance type
it is.
Methods
__construct() over-rides the native mysqli constructor in order to track the instance type of the db, otherwise
the mysqli constructor docs still apply.
__construct(string $host, string $user, string $pass, string $db, int $instanceType)
returns |
Mysqli A new mysqli connection |
Parameters
$pass
string
The db passwork
$db
string
The name of the database
$instanceType
int
The type of db connection requested
autocommit()
autocommit()
inherited_from |
mysqli::autocommit() |
change_user()
change_user()
inherited_from |
mysqli::change_user() |
character_set_name()
character_set_name()
inherited_from |
mysqli::character_set_name() |
close()
close()
inherited_from |
mysqli::close() |
commit()
commit()
inherited_from |
mysqli::commit() |
connect()
connect()
inherited_from |
mysqli::connect() |
debug()
debug()
inherited_from |
mysqli::debug() |
dump_debug_info()
dump_debug_info()
inherited_from |
mysqli::dump_debug_info() |
escape_string()
escape_string()
inherited_from |
mysqli::escape_string() |
Returns the instance type of the connection passed to the object in its constructor.
getInstanceType() : int
Returns
int
The instance type of the connection.
get_charset()
get_charset()
inherited_from |
mysqli::get_charset() |
get_client_info()
get_client_info()
inherited_from |
mysqli::get_client_info() |
get_server_info()
get_server_info()
inherited_from |
mysqli::get_server_info() |
get_warnings()
get_warnings()
inherited_from |
mysqli::get_warnings() |
init()
init()
inherited_from |
mysqli::init() |
kill()
kill()
inherited_from |
mysqli::kill() |
more_results()
more_results()
inherited_from |
mysqli::more_results() |
multi_query()
multi_query()
inherited_from |
mysqli::multi_query() |
mysqli()
mysqli()
inherited_from |
mysqli::mysqli() |
next_result()
next_result()
inherited_from |
mysqli::next_result() |
options()
options()
inherited_from |
mysqli::options() |
ping()
ping()
inherited_from |
mysqli::ping() |
prepare()
prepare()
inherited_from |
mysqli::prepare() |
Queries the database with additional logging functionality.
query(string $queryStr) : \Sporcle\DB\mysqli_result
Parameters
$queryStr
string
The SQL query to run against the database.
Returns
\Sporcle\DB\mysqli_result
The result object from the query, or false on failure.
real_connect()
real_connect()
inherited_from |
mysqli::real_connect() |
real_escape_string()
real_escape_string()
inherited_from |
mysqli::real_escape_string() |
real_query()
real_query()
inherited_from |
mysqli::real_query() |
refresh()
refresh()
inherited_from |
mysqli::refresh() |
rollback()
rollback()
inherited_from |
mysqli::rollback() |
select_db()
select_db()
inherited_from |
mysqli::select_db() |
set_charset()
set_charset()
inherited_from |
mysqli::set_charset() |
set_local_infile_default()
set_local_infile_default()
inherited_from |
mysqli::set_local_infile_default() |
set_local_infile_handler()
set_local_infile_handler()
inherited_from |
mysqli::set_local_infile_handler() |
set_opt()
set_opt()
inherited_from |
mysqli::set_opt() |
ssl_set()
ssl_set()
inherited_from |
mysqli::ssl_set() |
stat()
stat()
inherited_from |
mysqli::stat() |
stmt_init()
stmt_init()
inherited_from |
mysqli::stmt_init() |
store_result()
store_result()
inherited_from |
mysqli::store_result() |
thread_safe()
thread_safe()
inherited_from |
mysqli::thread_safe() |
use_result()
use_result()
inherited_from |
mysqli::use_result() |
Properties
<p>is used when deterimining if the query can be performed against the connection. This will be useful primarily when preventing insert or update queries from running on a slave.</p>
$instanceType : int