system/libraries/drivers/Database/Mysqli.php

Class: Database_Mysqli_Driver

class Database_Mysqli_Driver extends Database_Mysql_Driver

MySQLi Database Driver

Database_Mysqli_Driver -> __construct

public function __construct

Sets the config for the class.

Parameters:

array config
database configuration

Database_Mysqli_Driver -> __destruct

public function __destruct

Closes the database connection.


Database_Mysqli_Driver -> connect

public function connect

Database_Mysqli_Driver -> query

public function query

Parameters:

sql

Database_Mysqli_Driver -> set_charset

public function set_charset

Parameters:

charset

Database_Mysqli_Driver -> stmt_prepare

public function stmt_prepare

Parameters:

sql
(string )

Database_Mysqli_Driver -> escape_str

public function escape_str

Parameters:

str

Database_Mysqli_Driver -> show_error

public function show_error

Database_Mysqli_Driver -> field_data

public function field_data

Parameters:

table

Database_Mysqli_Driver -> escape_table

public function escape_table

Parameters:

table

Database_Mysqli_Driver -> escape_column

public function escape_column

Parameters:

column

Database_Mysqli_Driver -> regex

public function regex

Parameters:

field
match
type
num_regexs

Database_Mysqli_Driver -> notregex

public function notregex

Parameters:

field
match
type
num_regexs

Database_Mysqli_Driver -> merge

public function merge

Parameters:

table
keys
values

Database_Mysqli_Driver -> limit

public function limit

Parameters:

limit
offset
(int 0)

Database_Mysqli_Driver -> compile_select

public function compile_select

Parameters:

database

Database_Mysqli_Driver -> list_tables

public function list_tables

Database_Mysqli_Driver -> list_fields

public function list_fields

Parameters:

table

Database_Mysqli_Driver -> delete

public function delete

Builds a DELETE query.

Parameters:

string table
table name
array where
where clause

Return: string


Database_Mysqli_Driver -> update

public function update

Builds an UPDATE query.

Parameters:

string table
table name
array values
key => value pairs
array where
where clause

Return: string


Database_Mysqli_Driver -> where

public function where

Builds a WHERE portion of a query.

Parameters:

mixed key
key
string value
value
string type
type
int num_wheres
number of where clauses
boolean quote
escape the value

Return: string


Database_Mysqli_Driver -> like

public function like

Builds a LIKE portion of a query.

Parameters:

mixed field
field name
string match
value to match with field
string type
clause type (AND or OR)
int num_likes
number of likes

Return: string


Database_Mysqli_Driver -> notlike

public function notlike

Builds a NOT LIKE portion of a query.

Parameters:

mixed field
field name
string match
value to match with field
string type
clause type (AND or OR)
int num_likes
number of likes

Return: string


Database_Mysqli_Driver -> insert

public function insert

Builds an INSERT query.

Parameters:

string table
table name
array keys
keys
array values
values

Return: string


Database_Mysqli_Driver -> has_operator

public function has_operator

Determines if the string has an arithmetic operator in it.

Parameters:

string str
string to check

Return: boolean


Database_Mysqli_Driver -> escape

public function escape

Escapes any input value.

Parameters:

mixed value
value to escape

Return: string


Database_Mysqli_Driver -> sql_type

protected function sql_type

Fetches SQL type information about a field, in a generic format.

Parameters:

string str
field datatype

Return: array


Database_Mysqli_Driver -> clear_cache

public function clear_cache

Clears the internal query cache.

Parameters:

string sql
(NULL) SQL query

Database_Mysqli_Driver -> query_hash

protected function query_hash

Creates a hash for an SQL query string. Replaces newlines with spaces, trims, and hashes.

Parameters:

string sql
SQL query

Return: string


Class: Kohana_Mysqli_Result

class Kohana_Mysqli_Result implements Database_Result, ArrayAccess, Iterator, Traversable, Countable

MySQLi result.

Kohana_Mysqli_Result -> __construct

public function __construct

Sets up the result variables.

Parameters:

object link
database link
boolean object
return objects or arrays
string sql
SQL query that was run

Kohana_Mysqli_Result -> __destruct

public function __destruct

Magic __destruct function, frees the result.


Kohana_Mysqli_Result -> result

public function result

Parameters:

object
(TRUE)
type
(int 1)

Kohana_Mysqli_Result -> result_array

public function result_array

Parameters:

object
(NULL)
type
(int 1)

Kohana_Mysqli_Result -> insert_id

public function insert_id

Kohana_Mysqli_Result -> list_fields

public function list_fields

Kohana_Mysqli_Result -> count

public function count

Counts the number of rows in the result set.

Return: integer


Kohana_Mysqli_Result -> offsetExists

public function offsetExists

Determines if the requested offset of the result set exists.

Parameters:

integer offset
offset id

Return: boolean


Kohana_Mysqli_Result -> offsetGet

public function offsetGet

Retreives the requested query result offset.

Parameters:

integer offset
offset id

Return: mixed


Kohana_Mysqli_Result -> offsetSet

public function offsetSet

Sets the offset with the provided value. Since you can't modify query result sets, this function just throws an exception.

Parameters:

integer offset
offset id
integer value
value to set

Throws: Kohana_Database_Exception


Kohana_Mysqli_Result -> offsetUnset

public function offsetUnset

Unsets the offset. Since you can't modify query result sets, this function just throws an exception.

Parameters:

integer offset
offset id

Throws: Kohana_Database_Exception


Kohana_Mysqli_Result -> current

public function current

Retrieves the current result set row.

Return: mixed


Kohana_Mysqli_Result -> key

public function key

Retreives the current row id.

Return: integer


Kohana_Mysqli_Result -> next

public function next

Moves the result pointer ahead one step.

Return: integer


Kohana_Mysqli_Result -> prev

public function prev

Moves the result pointer back one step.

Return: integer


Kohana_Mysqli_Result -> rewind

public function rewind

Moves the result pointer to the beginning of the result set.

Return: integer


Kohana_Mysqli_Result -> valid

public function valid

Determines if the current result pointer is valid.

Return: boolean


Class: Kohana_Mysqli_Statement

class Kohana_Mysqli_Statement

MySQLi Prepared Statement (experimental)

Kohana_Mysqli_Statement -> __construct

public function __construct

Parameters:

sql
link

Kohana_Mysqli_Statement -> __destruct

public function __destruct

Kohana_Mysqli_Statement -> bind_params

public function bind_params

Parameters:

param_types
params

Kohana_Mysqli_Statement -> bind_result

public function bind_result

Parameters:

params

Kohana_Mysqli_Statement -> execute

public function execute