PHP Класс CI_DB_query_builder, TastyIgniter

This is the platform-independent base Query Builder implementation class.
Автор: EllisLab Dev Team
Наследование: extends CI_DB_driver
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$qb_aliased_tables array QB aliased tables list
$qb_cache_exists array QB Cache exists list
$qb_cache_from array QB Cache FROM data
$qb_cache_groupby array QB Cache GROUP BY data
$qb_cache_having array QB Cache HAVING data
$qb_cache_join array QB Cache JOIN data
$qb_cache_no_escape array QB Cache No Escape data
$qb_cache_orderby array QB Cache ORDER BY data
$qb_cache_select array QB Cache SELECT data
$qb_cache_set array QB Cache data sets
$qb_cache_where array QB Cache WHERE data
$qb_caching boolean QB Caching flag
$qb_distinct boolean QB DISTINCT flag
$qb_from array QB FROM data
$qb_groupby array QB GROUP BY data
$qb_having array QB HAVING data
$qb_join array QB JOIN data
$qb_keys array QB keys
$qb_limit integer QB LIMIT data
$qb_no_escape array QB No Escape data
$qb_offset integer QB OFFSET data
$qb_orderby array QB ORDER BY data
$qb_select array QB SELECT data
$qb_set array QB data sets
$qb_where array QB WHERE data
$qb_where_group_count integer QB WHERE group count
$qb_where_group_started boolean QB WHERE group started flag
$reset_delete_data boolean Reset DELETE data flag
$return_delete_sql boolean Return DELETE SQL flag

Открытые методы

Метод Описание
count_all_results ( $table = '', $reset = TRUE ) : integer "Count All Results" query
dbprefix ( $table = '' ) : string DB Prefix
delete ( $table = '', $where = '', $limit = NULL, $reset_data = TRUE ) : mixed Delete
distinct ( boolean $val = TRUE ) : CI_DB_query_builder DISTINCT
empty_table ( $table = '' ) : boolean Empty Table
flush_cache ( ) : CI_DB_query_builder Flush Cache
from ( mixed $from ) : CI_DB_query_builder From
get ( $table = '', $limit = NULL, $offset = NULL ) : CI_DB_result Get
get_compiled_delete ( $table = '', $reset = TRUE ) : string Get DELETE query string
get_compiled_insert ( $table = '', $reset = TRUE ) : string Get INSERT query string
get_compiled_select ( $table = '', $reset = TRUE ) : string Get SELECT query string
get_compiled_update ( $table = '', $reset = TRUE ) : string Get UPDATE query string
get_where ( string $table = '', string $where = NULL, integer $limit = NULL, integer $offset = NULL ) : CI_DB_result Get_Where
group_by ( string $by, boolean $escape = NULL ) : CI_DB_query_builder GROUP BY
group_end ( ) : CI_DB_query_builder Ends a query group
group_start ( string $not = '', string $type = 'AND ' ) : CI_DB_query_builder Starts a query group.
having ( string $key, string $value = NULL, boolean $escape = NULL ) : CI_DB_query_builder HAVING
insert ( $table = '', $set = NULL, boolean $escape = NULL ) : boolean Insert
insert_batch ( string $table, array $set = NULL, boolean $escape = NULL, $batch_size = 100 ) : integer Insert_Batch
join ( $table, $cond, $type = '', $escape = NULL ) : CI_DB_query_builder JOIN
like ( mixed $field, string $match = '', string $side = 'both', boolean $escape = NULL ) : CI_DB_query_builder LIKE
limit ( integer $value, integer $offset ) : CI_DB_query_builder LIMIT
not_group_start ( ) : CI_DB_query_builder Starts a query group, but NOTs the group
not_like ( mixed $field, string $match = '', string $side = 'both', boolean $escape = NULL ) : CI_DB_query_builder NOT LIKE
offset ( integer $offset ) : CI_DB_query_builder Sets the OFFSET value
or_group_start ( ) : CI_DB_query_builder Starts a query group, but ORs the group
or_having ( string $key, string $value = NULL, boolean $escape = NULL ) : CI_DB_query_builder OR HAVING
or_like ( mixed $field, string $match = '', string $side = 'both', boolean $escape = NULL ) : CI_DB_query_builder OR LIKE
or_not_group_start ( ) : CI_DB_query_builder Starts a query group, but OR NOTs the group
or_not_like ( mixed $field, string $match = '', string $side = 'both', boolean $escape = NULL ) : CI_DB_query_builder OR NOT LIKE
or_where ( $key, $value = NULL, $escape = NULL ) : CI_DB_query_builder OR WHERE
or_where_in ( string $key = NULL, array $values = NULL, boolean $escape = NULL ) : CI_DB_query_builder OR WHERE IN
or_where_not_in ( string $key = NULL, array $values = NULL, boolean $escape = NULL ) : CI_DB_query_builder OR WHERE NOT IN
order_by ( string $orderby, string $direction = '', boolean $escape = NULL ) : CI_DB_query_builder ORDER BY
replace ( $table = '', $set = NULL ) : boolean Replace
reset_query ( ) : CI_DB_query_builder Reset Query Builder values.
select ( $select = '*', $escape = NULL ) : CI_DB_query_builder Select
select_avg ( $select = '', $alias = '' ) : CI_DB_query_builder Select Average
select_max ( $select = '', $alias = '' ) : CI_DB_query_builder Select Max
select_min ( $select = '', $alias = '' ) : CI_DB_query_builder Select Min
select_sum ( $select = '', $alias = '' ) : CI_DB_query_builder Select Sum
set ( $key, $value = '', $escape = NULL ) : CI_DB_query_builder The "set" function.
set_dbprefix ( $prefix = '' ) : string Set DB Prefix
set_insert_batch ( $key, $value = '', $escape = NULL ) : CI_DB_query_builder The "set_insert_batch" function. Allows key/value pairs to be set for batch inserts
set_update_batch ( $key, $index = '', $escape = NULL ) : CI_DB_query_builder The "set_update_batch" function. Allows key/value pairs to be set for batch updating
start_cache ( ) : CI_DB_query_builder Start Cache
stop_cache ( ) : CI_DB_query_builder Stop Cache
truncate ( $table = '' ) : boolean Truncate
update ( string $table = '', array $set = NULL, mixed $where = NULL, integer $limit = NULL ) : boolean UPDATE
update_batch ( $table, $set = NULL, $index = NULL, $batch_size = 100 ) : integer Update_Batch
where ( $key, $value = NULL, $escape = NULL ) : CI_DB_query_builder WHERE
where_in ( string $key = NULL, array $values = NULL, boolean $escape = NULL ) : CI_DB_query_builder WHERE IN
where_not_in ( string $key = NULL, array $values = NULL, boolean $escape = NULL ) : CI_DB_query_builder WHERE NOT IN

Защищенные методы

Метод Описание
_compile_group_by ( ) : string Compile GROUP BY
_compile_order_by ( ) : string Compile ORDER BY
_compile_select ( boolean $select_override = FALSE ) : string Compile the SELECT statement
_compile_wh ( string $qb_key ) : string Compile WHERE, HAVING statements
_create_alias_from_table ( string $item ) : string Determines the alias name based on the table
_delete ( $table ) : string Delete statement
_from_tables ( ) : string FROM tables
_group_get_type ( string $type ) : string Group_get_type
_insert_batch ( string $table, array $keys, array $values ) : string Insert batch statement
_is_literal ( string $str ) : boolean Is literal
_like ( mixed $field, string $match = '', string $type = 'AND ', string $side = 'both', string $not = '', boolean $escape = NULL ) : CI_DB_query_builder Internal LIKE
_limit ( string $sql ) : string LIMIT string
_max_min_avg_sum ( string $select = '', string $alias = '', string $type = 'MAX' ) : CI_DB_query_builder SELECT [MAX|MIN|AVG|SUM]()
_merge_cache ( ) : void Merge Cache
_object_to_array ( $object ) : array Object to Array
_object_to_array_batch ( $object ) : array Object to Array
_replace ( $table, $keys, $values ) : string Replace statement
_reset_run ( $qb_reset_items ) : void Resets the query builder values. Called by the get() function
_reset_select ( ) : void Resets the query builder values. Called by the get() function
_reset_write ( ) : void Resets the query builder "write" values.
_track_aliases ( $table ) : string Track Aliases
_truncate ( $table ) : string Truncate statement
_update_batch ( string $table, array $values, string $index ) : string Update_Batch statement
_validate_insert ( $table = '' ) : string Validate Insert
_validate_update ( $table ) : boolean Validate Update
_wh ( string $qb_key, mixed $key, mixed $value = NULL, string $type = 'AND ', boolean $escape = NULL ) : CI_DB_query_builder WHERE, HAVING
_where_in ( string $key = NULL, array $values = NULL, boolean $not = FALSE, string $type = 'AND ', boolean $escape = NULL ) : CI_DB_query_builder Internal WHERE IN

Описание методов

_compile_group_by() защищенный Метод

Escapes identifiers in GROUP BY statements at execution time. Required so that aliases are tracked properly, regardless of wether group_by() is called prior to from(), join() and dbprefix is added only if needed.
protected _compile_group_by ( ) : string
Результат string SQL statement

_compile_order_by() защищенный Метод

Escapes identifiers in ORDER BY statements at execution time. Required so that aliases are tracked properly, regardless of wether order_by() is called prior to from(), join() and dbprefix is added only if needed.
protected _compile_order_by ( ) : string
Результат string SQL statement

_compile_select() защищенный Метод

Generates a query string based on which functions were used. Should not be called directly.
protected _compile_select ( boolean $select_override = FALSE ) : string
$select_override boolean
Результат string

_compile_wh() защищенный Метод

Escapes identifiers in WHERE and HAVING statements at execution time. Required so that aliases are tracked properly, regardless of whether where(), or_where(), having(), or_having are called prior to from(), join() and dbprefix is added only if needed.
protected _compile_wh ( string $qb_key ) : string
$qb_key string 'qb_where' or 'qb_having'
Результат string SQL statement

_create_alias_from_table() защищенный Метод

Determines the alias name based on the table
protected _create_alias_from_table ( string $item ) : string
$item string
Результат string

_delete() защищенный Метод

Generates a platform-specific delete string from the supplied data
protected _delete ( $table ) : string
Результат string

_from_tables() защищенный Метод

Groups tables in FROM clauses if needed, so there is no confusion about operator precedence. Note: This is only used (and overridden) by MySQL and CUBRID.
protected _from_tables ( ) : string
Результат string

_group_get_type() защищенный Метод

Group_get_type
protected _group_get_type ( string $type ) : string
$type string
Результат string

_insert_batch() защищенный Метод

Generates a platform-specific insert string from the supplied data.
protected _insert_batch ( string $table, array $keys, array $values ) : string
$table string Table name
$keys array INSERT keys
$values array INSERT values
Результат string

_is_literal() защищенный Метод

Determines if a string represents a literal value or a field name
protected _is_literal ( string $str ) : boolean
$str string
Результат boolean

_like() защищенный Метод

Internal LIKE
protected _like ( mixed $field, string $match = '', string $type = 'AND ', string $side = 'both', string $not = '', boolean $escape = NULL ) : CI_DB_query_builder
$field mixed
$match string
$type string
$side string
$not string
$escape boolean
Результат CI_DB_query_builder

_limit() защищенный Метод

Generates a platform-specific LIMIT clause.
protected _limit ( string $sql ) : string
$sql string SQL Query
Результат string

_max_min_avg_sum() защищенный Метод

SELECT [MAX|MIN|AVG|SUM]()
protected _max_min_avg_sum ( string $select = '', string $alias = '', string $type = 'MAX' ) : CI_DB_query_builder
$select string Field name
$alias string
$type string
Результат CI_DB_query_builder

_merge_cache() защищенный Метод

When called, this function merges any cached QB arrays with locally called ones.
protected _merge_cache ( ) : void
Результат void

_object_to_array() защищенный Метод

Takes an object as input and converts the class variables to array key/vals
protected _object_to_array ( $object ) : array
Результат array

_object_to_array_batch() защищенный Метод

Takes an object as input and converts the class variables to array key/vals
protected _object_to_array_batch ( $object ) : array
Результат array

_replace() защищенный Метод

Generates a platform-specific replace string from the supplied data
protected _replace ( $table, $keys, $values ) : string
Результат string

_reset_run() защищенный Метод

Resets the query builder values. Called by the get() function
protected _reset_run ( $qb_reset_items ) : void
Результат void

_reset_select() защищенный Метод

Resets the query builder values. Called by the get() function
protected _reset_select ( ) : void
Результат void

_reset_write() защищенный Метод

Called by the insert() update() insert_batch() update_batch() and delete() functions
protected _reset_write ( ) : void
Результат void

_track_aliases() защищенный Метод

Used to track SQL statements written with aliased tables.
protected _track_aliases ( $table ) : string
Результат string

_truncate() защищенный Метод

Generates a platform-specific truncate string from the supplied data If the database does not support the truncate() command, then this method maps to 'DELETE FROM table'
protected _truncate ( $table ) : string
Результат string

_update_batch() защищенный Метод

Generates a platform-specific batch update string from the supplied data
protected _update_batch ( string $table, array $values, string $index ) : string
$table string Table name
$values array Update data
$index string WHERE key
Результат string

_validate_insert() защищенный Метод

This method is used by both insert() and get_compiled_insert() to validate that the there data is actually being set and that table has been chosen to be inserted into.
protected _validate_insert ( $table = '' ) : string
Результат string

_validate_update() защищенный Метод

This method is used by both update() and get_compiled_update() to validate that data is actually being set and that a table has been chosen to be update.
protected _validate_update ( $table ) : boolean
Результат boolean

_wh() защищенный Метод

WHERE, HAVING
protected _wh ( string $qb_key, mixed $key, mixed $value = NULL, string $type = 'AND ', boolean $escape = NULL ) : CI_DB_query_builder
$qb_key string 'qb_where' or 'qb_having'
$key mixed
$value mixed
$type string
$escape boolean
Результат CI_DB_query_builder

_where_in() защищенный Метод

Internal WHERE IN
protected _where_in ( string $key = NULL, array $values = NULL, boolean $not = FALSE, string $type = 'AND ', boolean $escape = NULL ) : CI_DB_query_builder
$key string The field to search
$values array The values searched on
$not boolean If the statement would be IN or NOT IN
$type string
$escape boolean
Результат CI_DB_query_builder

count_all_results() публичный Метод

Generates a platform-specific query string that counts all records returned by an Query Builder query.
public count_all_results ( $table = '', $reset = TRUE ) : integer
Результат integer

dbprefix() публичный Метод

Prepends a database prefix if one exists in configuration
public dbprefix ( $table = '' ) : string
Результат string

delete() публичный Метод

Compiles a delete string and runs the query
public delete ( $table = '', $where = '', $limit = NULL, $reset_data = TRUE ) : mixed
Результат mixed

distinct() публичный Метод

Sets a flag which tells the query string compiler to add DISTINCT
public distinct ( boolean $val = TRUE ) : CI_DB_query_builder
$val boolean
Результат CI_DB_query_builder

empty_table() публичный Метод

Compiles a delete string and runs "DELETE FROM table"
public empty_table ( $table = '' ) : boolean
Результат boolean TRUE on success, FALSE on failure

flush_cache() публичный Метод

Empties the QB cache
public flush_cache ( ) : CI_DB_query_builder
Результат CI_DB_query_builder

from() публичный Метод

Generates the FROM portion of the query
public from ( mixed $from ) : CI_DB_query_builder
$from mixed can be a string or array
Результат CI_DB_query_builder

get() публичный Метод

Compiles the select statement based on the other functions called and runs the query
public get ( $table = '', $limit = NULL, $offset = NULL ) : CI_DB_result
Результат CI_DB_result

get_compiled_delete() публичный Метод

Compiles a delete query string and returns the sql
public get_compiled_delete ( $table = '', $reset = TRUE ) : string
Результат string

get_compiled_insert() публичный Метод

Compiles an insert query and returns the sql
public get_compiled_insert ( $table = '', $reset = TRUE ) : string
Результат string

get_compiled_select() публичный Метод

Compiles a SELECT query string and returns the sql.
public get_compiled_select ( $table = '', $reset = TRUE ) : string
Результат string

get_compiled_update() публичный Метод

Compiles an update query and returns the sql
public get_compiled_update ( $table = '', $reset = TRUE ) : string
Результат string

get_where() публичный Метод

Allows the where clause, limit and offset to be added directly
public get_where ( string $table = '', string $where = NULL, integer $limit = NULL, integer $offset = NULL ) : CI_DB_result
$table string
$where string
$limit integer
$offset integer
Результат CI_DB_result

group_by() публичный Метод

GROUP BY
public group_by ( string $by, boolean $escape = NULL ) : CI_DB_query_builder
$by string
$escape boolean
Результат CI_DB_query_builder

group_end() публичный Метод

Ends a query group
public group_end ( ) : CI_DB_query_builder
Результат CI_DB_query_builder

group_start() публичный Метод

Starts a query group.
public group_start ( string $not = '', string $type = 'AND ' ) : CI_DB_query_builder
$not string (Internal use only)
$type string (Internal use only)
Результат CI_DB_query_builder

having() публичный Метод

Separates multiple calls with 'AND'.
public having ( string $key, string $value = NULL, boolean $escape = NULL ) : CI_DB_query_builder
$key string
$value string
$escape boolean
Результат CI_DB_query_builder

insert() публичный Метод

Compiles an insert string and runs the query
public insert ( $table = '', $set = NULL, boolean $escape = NULL ) : boolean
$escape boolean Whether to escape values and identifiers
Результат boolean TRUE on success, FALSE on failure

insert_batch() публичный Метод

Compiles batch insert strings and runs the queries
public insert_batch ( string $table, array $set = NULL, boolean $escape = NULL, $batch_size = 100 ) : integer
$table string Table to insert into
$set array An associative array of insert values
$escape boolean Whether to escape values and identifiers
Результат integer Number of rows inserted or FALSE on failure

join() публичный Метод

Generates the JOIN portion of the query
public join ( $table, $cond, $type = '', $escape = NULL ) : CI_DB_query_builder
Результат CI_DB_query_builder

like() публичный Метод

Generates a %LIKE% portion of the query. Separates multiple calls with 'AND'.
public like ( mixed $field, string $match = '', string $side = 'both', boolean $escape = NULL ) : CI_DB_query_builder
$field mixed
$match string
$side string
$escape boolean
Результат CI_DB_query_builder

limit() публичный Метод

LIMIT
public limit ( integer $value, integer $offset ) : CI_DB_query_builder
$value integer LIMIT value
$offset integer OFFSET value
Результат CI_DB_query_builder

not_group_start() публичный Метод

Starts a query group, but NOTs the group
public not_group_start ( ) : CI_DB_query_builder
Результат CI_DB_query_builder

not_like() публичный Метод

Generates a NOT LIKE portion of the query. Separates multiple calls with 'AND'.
public not_like ( mixed $field, string $match = '', string $side = 'both', boolean $escape = NULL ) : CI_DB_query_builder
$field mixed
$match string
$side string
$escape boolean
Результат CI_DB_query_builder

offset() публичный Метод

Sets the OFFSET value
public offset ( integer $offset ) : CI_DB_query_builder
$offset integer OFFSET value
Результат CI_DB_query_builder

or_group_start() публичный Метод

Starts a query group, but ORs the group
public or_group_start ( ) : CI_DB_query_builder
Результат CI_DB_query_builder

or_having() публичный Метод

Separates multiple calls with 'OR'.
public or_having ( string $key, string $value = NULL, boolean $escape = NULL ) : CI_DB_query_builder
$key string
$value string
$escape boolean
Результат CI_DB_query_builder

or_like() публичный Метод

Generates a %LIKE% portion of the query. Separates multiple calls with 'OR'.
public or_like ( mixed $field, string $match = '', string $side = 'both', boolean $escape = NULL ) : CI_DB_query_builder
$field mixed
$match string
$side string
$escape boolean
Результат CI_DB_query_builder

or_not_group_start() публичный Метод

Starts a query group, but OR NOTs the group
public or_not_group_start ( ) : CI_DB_query_builder
Результат CI_DB_query_builder

or_not_like() публичный Метод

Generates a NOT LIKE portion of the query. Separates multiple calls with 'OR'.
public or_not_like ( mixed $field, string $match = '', string $side = 'both', boolean $escape = NULL ) : CI_DB_query_builder
$field mixed
$match string
$side string
$escape boolean
Результат CI_DB_query_builder

or_where() публичный Метод

Generates the WHERE portion of the query. Separates multiple calls with 'OR'.
public or_where ( $key, $value = NULL, $escape = NULL ) : CI_DB_query_builder
Результат CI_DB_query_builder

or_where_in() публичный Метод

Generates a WHERE field IN('item', 'item') SQL query, joined with 'OR' if appropriate.
public or_where_in ( string $key = NULL, array $values = NULL, boolean $escape = NULL ) : CI_DB_query_builder
$key string The field to search
$values array The values searched on
$escape boolean
Результат CI_DB_query_builder

or_where_not_in() публичный Метод

Generates a WHERE field NOT IN('item', 'item') SQL query, joined with 'OR' if appropriate.
public or_where_not_in ( string $key = NULL, array $values = NULL, boolean $escape = NULL ) : CI_DB_query_builder
$key string The field to search
$values array The values searched on
$escape boolean
Результат CI_DB_query_builder

order_by() публичный Метод

ORDER BY
public order_by ( string $orderby, string $direction = '', boolean $escape = NULL ) : CI_DB_query_builder
$orderby string
$direction string ASC, DESC or RANDOM
$escape boolean
Результат CI_DB_query_builder

replace() публичный Метод

Compiles an replace into string and runs the query
public replace ( $table = '', $set = NULL ) : boolean
Результат boolean TRUE on success, FALSE on failure

reset_query() публичный Метод

Publicly-visible method to reset the QB values.
public reset_query ( ) : CI_DB_query_builder
Результат CI_DB_query_builder

select() публичный Метод

Generates the SELECT portion of the query
public select ( $select = '*', $escape = NULL ) : CI_DB_query_builder
Результат CI_DB_query_builder

select_avg() публичный Метод

Generates a SELECT AVG(field) portion of a query
public select_avg ( $select = '', $alias = '' ) : CI_DB_query_builder
Результат CI_DB_query_builder

select_max() публичный Метод

Generates a SELECT MAX(field) portion of a query
public select_max ( $select = '', $alias = '' ) : CI_DB_query_builder
Результат CI_DB_query_builder

select_min() публичный Метод

Generates a SELECT MIN(field) portion of a query
public select_min ( $select = '', $alias = '' ) : CI_DB_query_builder
Результат CI_DB_query_builder

select_sum() публичный Метод

Generates a SELECT SUM(field) portion of a query
public select_sum ( $select = '', $alias = '' ) : CI_DB_query_builder
Результат CI_DB_query_builder

set() публичный Метод

Allows key/value pairs to be set for inserting or updating
public set ( $key, $value = '', $escape = NULL ) : CI_DB_query_builder
Результат CI_DB_query_builder

set_dbprefix() публичный Метод

Set's the DB Prefix to something new without needing to reconnect
public set_dbprefix ( $prefix = '' ) : string
Результат string

set_insert_batch() публичный Метод

The "set_insert_batch" function. Allows key/value pairs to be set for batch inserts
public set_insert_batch ( $key, $value = '', $escape = NULL ) : CI_DB_query_builder
Результат CI_DB_query_builder

set_update_batch() публичный Метод

The "set_update_batch" function. Allows key/value pairs to be set for batch updating
public set_update_batch ( $key, $index = '', $escape = NULL ) : CI_DB_query_builder
Результат CI_DB_query_builder

start_cache() публичный Метод

Starts QB caching
public start_cache ( ) : CI_DB_query_builder
Результат CI_DB_query_builder

stop_cache() публичный Метод

Stops QB caching
public stop_cache ( ) : CI_DB_query_builder
Результат CI_DB_query_builder

truncate() публичный Метод

Compiles a truncate string and runs the query If the database does not support the truncate() command This function maps to "DELETE FROM table"
public truncate ( $table = '' ) : boolean
Результат boolean TRUE on success, FALSE on failure

update() публичный Метод

Compiles an update string and runs the query.
public update ( string $table = '', array $set = NULL, mixed $where = NULL, integer $limit = NULL ) : boolean
$table string
$set array An associative array of update values
$where mixed
$limit integer
Результат boolean TRUE on success, FALSE on failure

update_batch() публичный Метод

Compiles an update string and runs the query
public update_batch ( $table, $set = NULL, $index = NULL, $batch_size = 100 ) : integer
Результат integer number of rows affected or FALSE on failure

where() публичный Метод

Generates the WHERE portion of the query. Separates multiple calls with 'AND'.
public where ( $key, $value = NULL, $escape = NULL ) : CI_DB_query_builder
Результат CI_DB_query_builder

where_in() публичный Метод

Generates a WHERE field IN('item', 'item') SQL query, joined with 'AND' if appropriate.
public where_in ( string $key = NULL, array $values = NULL, boolean $escape = NULL ) : CI_DB_query_builder
$key string The field to search
$values array The values searched on
$escape boolean
Результат CI_DB_query_builder

where_not_in() публичный Метод

Generates a WHERE field NOT IN('item', 'item') SQL query, joined with 'AND' if appropriate.
public where_not_in ( string $key = NULL, array $values = NULL, boolean $escape = NULL ) : CI_DB_query_builder
$key string The field to search
$values array The values searched on
$escape boolean
Результат CI_DB_query_builder

Описание свойств

$qb_aliased_tables защищенное свойство

QB aliased tables list
protected array $qb_aliased_tables
Результат array

$qb_cache_exists защищенное свойство

QB Cache exists list
protected array $qb_cache_exists
Результат array

$qb_cache_from защищенное свойство

QB Cache FROM data
protected array $qb_cache_from
Результат array

$qb_cache_groupby защищенное свойство

QB Cache GROUP BY data
protected array $qb_cache_groupby
Результат array

$qb_cache_having защищенное свойство

QB Cache HAVING data
protected array $qb_cache_having
Результат array

$qb_cache_join защищенное свойство

QB Cache JOIN data
protected array $qb_cache_join
Результат array

$qb_cache_no_escape защищенное свойство

QB Cache No Escape data
protected array $qb_cache_no_escape
Результат array

$qb_cache_orderby защищенное свойство

QB Cache ORDER BY data
protected array $qb_cache_orderby
Результат array

$qb_cache_select защищенное свойство

QB Cache SELECT data
protected array $qb_cache_select
Результат array

$qb_cache_set защищенное свойство

QB Cache data sets
protected array $qb_cache_set
Результат array

$qb_cache_where защищенное свойство

QB Cache WHERE data
protected array $qb_cache_where
Результат array

$qb_caching защищенное свойство

QB Caching flag
protected bool $qb_caching
Результат boolean

$qb_distinct защищенное свойство

QB DISTINCT flag
protected bool $qb_distinct
Результат boolean

$qb_from защищенное свойство

QB FROM data
protected array $qb_from
Результат array

$qb_groupby защищенное свойство

QB GROUP BY data
protected array $qb_groupby
Результат array

$qb_having защищенное свойство

QB HAVING data
protected array $qb_having
Результат array

$qb_join защищенное свойство

QB JOIN data
protected array $qb_join
Результат array

$qb_keys защищенное свойство

QB keys
protected array $qb_keys
Результат array

$qb_limit защищенное свойство

QB LIMIT data
protected int $qb_limit
Результат integer

$qb_no_escape защищенное свойство

QB No Escape data
protected array $qb_no_escape
Результат array

$qb_offset защищенное свойство

QB OFFSET data
protected int $qb_offset
Результат integer

$qb_orderby защищенное свойство

QB ORDER BY data
protected array $qb_orderby
Результат array

$qb_select защищенное свойство

QB SELECT data
protected array $qb_select
Результат array

$qb_set защищенное свойство

QB data sets
protected array $qb_set
Результат array

$qb_where защищенное свойство

QB WHERE data
protected array $qb_where
Результат array

$qb_where_group_count защищенное свойство

QB WHERE group count
protected int $qb_where_group_count
Результат integer

$qb_where_group_started защищенное свойство

QB WHERE group started flag
protected bool $qb_where_group_started
Результат boolean

$reset_delete_data защищенное свойство

Reset DELETE data flag
protected bool $reset_delete_data
Результат boolean

$return_delete_sql защищенное свойство

Return DELETE SQL flag
protected bool $return_delete_sql
Результат boolean