Database Driver.
| package | core_database_drivers |
|---|---|
| inherited_from | \Database_super_mysql |
can_arbitrary_groupby() : boolean
booleanWhether it candb_change_primary_key(\ID_TEXT $table_name, array $new_key, array $db)
\ID_TEXTThe name of the table to create the index on
arrayA list of fields to put in the new key
arrayThe DB connection to make on
db_close_connections()
db_create_index(\ID_TEXT $table_name, \ID_TEXT $index_name, string $_fields, array $db)
\ID_TEXTThe name of the table to create the index on
\ID_TEXTThe index name (not really important at all)
stringPart of the SQL query: a comma-separated list of fields to use on the index
arrayThe DB connection to make on
db_create_table(\ID_TEXT $table_name, array $fields, array $db, \ID_TEXT $raw_table_name, boolean $save_bytes = false)
\ID_TEXTThe table name
arrayA map of field names to Composr field types (with *#? encodings)
arrayThe DB connection to make on
\ID_TEXTThe table name with no table prefix
booleanWhether to use lower-byte table storage, with tradeoffs of not being able to support all unicode characters; use this if key length is an issue
db_default_password() : string
stringThe default password for db connectionsdb_default_user() : string
stringThe default user for db connectionsdb_drop_table_if_exists(\ID_TEXT $table, array $db)
\ID_TEXTThe table name
arrayThe DB connection to delete on
db_empty_is_null() : boolean
booleanWhether a blank string IS NULLdb_encode_like(string $pattern) : string
stringThe pattern
stringThe encoded patterndb_escape_string(string $string) : string
stringThe string
stringThe escaped stringdb_full_text_assemble(string $content, boolean $boolean) : string
stringOur match string (assumes "?" has been stripped already)
booleanWhether to do a boolean full text search
stringPart of a WHERE clause for doing full-text searchdb_get_connection(boolean $persistent, string $db_name, string $db_host, string $db_user, string $db_password, boolean $fail_ok = false) : \?array
booleanWhether to create a persistent connection
stringThe database name
stringThe database host (the server)
stringThe database connection username
stringThe database connection password
booleanWhether to on error echo an error and return with a NULL, rather than giving a critical error
\?arrayA database connection (note for MySQL, it's actually a pair, containing the database name too: because we need to select the name before each query on the connection) (null: error)db_get_first_id() : integer
integerFirst ID useddb_get_query_rows(object $results) : array
objectThe query result pointer
arrayA list of row mapsdb_get_type_remap() : array
arrayThe mapdb_has_collate_settings(array $db) : boolean
arrayA DB connection
booleanWhether it isdb_has_expression_ordering(array $db) : boolean
arrayA DB connection
booleanWhether it isdb_has_full_text(array $db) : boolean
arrayA DB connection
booleanWhether it isdb_has_full_text_boolean() : boolean
booleanWhether it isdb_has_subqueries(array $db) : boolean
arrayA DB connection
booleanWhether it isdb_is_flat_file_simple() : boolean
booleanWhether the database is a flat file databasedb_query(string $query, array $db_parts, \?integer $max= null, \?integer $start= null, boolean $fail_ok= false, boolean $get_insert_id= false) : \?mixed
stringThe complete SQL query
arrayA DB connection
\?integerThe maximum number of rows to affect (null: no limit)
\?integerThe start row to affect (null: no specification)
booleanWhether to output an error on failure
booleanWhether to get the autoincrement ID created for an insert query
\?mixedThe results (null: no results), or the insert IDdb_string_equal_to(\ID_TEXT $attribute, string $compare) : string
\ID_TEXTThe attribute
stringThe comparison
stringThe SQLdb_string_not_equal_to(\ID_TEXT $attribute, string $compare) : string
\ID_TEXTThe attribute
stringThe comparison
stringThe SQLusing_innodb() : boolean
booleanAnswer$cache_db
array()$last_select_db
null