Class Database_Static_xml

Description

Located in /sources/database/xml.php (line 120)


	
			
Method Summary
void db_change_primary_key (ID_TEXT $table_name, array $new_key, array $db)
void db_create_index (ID_TEXT $table_name, ID_TEXT $index_name, string $_fields, array $db)
void db_create_table (ID_TEXT $table_name, array $fields, array $db, [boolean $if_not_exists = false])
string db_default_user ()
void db_drop_if_exists (ID_TEXT $table_name, array $db)
boolean db_empty_is_null ()
string db_encode_like (string $pattern)
string db_escape_string (string $string)
string db_full_text_assemble (string $content, boolean $boolean)
?array db_get_connection (boolean $persistent, string $db_name, string $db_host, string $db_user, string $db_password, [boolean $fail_ok = false])
integer db_get_first_id ()
boolean db_has_full_text (array $db)
boolean db_has_subqueries (array $db)
?mixed db_query (string $query, array $db, [?integer $max = NULL], [?integer $start = NULL], [boolean $fail_ok = false], [boolean $get_insert_id = false], [boolean $no_syndicate = false], [boolean $save_as_volatile = false])
string db_string_equal_to (ID_TEXT $attribute, string $compare)
string db_string_not_equal_to (ID_TEXT $attribute, string $compare)
boolean is_start_of_delimiter (string $looking)
?mixed _bad_query (string $query, [boolean $fail_ok = false], [?string $error = NULL])
void _delete_record (PATH $path, array $db)
?mixed _do_query_alter (array $tokens, string $query, array $db, boolean $fail_ok)
?mixed _do_query_create (array $tokens, string $query, array $db, boolean $fail_ok)
?mixed _do_query_delete (array $tokens, string $query, array $db, ?integer $max, ?integer $start, boolean $fail_ok)
?mixed _do_query_drop (array $tokens, string $query, array $db, boolean $fail_ok)
?mixed _do_query_insert (array $tokens, string $query, array $db, boolean $fail_ok, boolean $get_insert_id, ?integer &$random_key, [boolean $save_as_volatile = false])
?mixed _do_query_insert__execute (array $inserts, ID_TEXT $table_name, string $query, array $db, boolean $fail_ok, boolean $get_insert_id, ?integer &$random_key, [boolean $save_as_volatile = false])
?array _do_query_insert__parse (array $tokens, string $query, array $db, boolean $fail_ok)
?mixed _do_query_select (array $tokens, string $query, array $db, ?integer $max, ?integer $start, boolean $fail_ok, integer &$at, [boolean $do_end_check = true])
?mixed _do_query_update (array $tokens, string $query, array $db, ?integer $max, ?integer $start, boolean $fail_ok)
string _escape_name (string $in)
?mixed _execute_expression (array $expr, array $bindings, string $query)
?array _execute_join (array $db, string $joined_as_prior, array $join, string $query, array $records, array $schema, array $where_expr, [boolean $fail_ok = false])
array _function_set_scoping (array $set, array $select, array $rep, string $query)
string _guid ([?array $schema = NULL], [?array $record = NULL])
boolean _key_conflict_check (array $db, string $table_name, array $schema, array $record, string $query, boolean $fail_ok, [?string $existing_identity = NULL])
boolean _parsing_check_ended (integer $at, array $tokens, string $query, [boolean $fail_ok = false])
boolean _parsing_expects (integer &$at, array $tokens, string $token, string $query, [boolean $fail_ok = false])
?string _parsing_read (integer &$at, array $tokens, string $query, [boolean $fail_ok = false])
?array _parsing_read_expression (integer &$at, array $tokens, string $query, array $db, [boolean $look_for_connectives = true], [boolean $look_for_any_connectives = true], [boolean $fail_ok = false])
?array _read_all_records (array $db, string $table_name, string $table_as, ?array $schema, ?array $where_expr, boolean $fail_ok, string $query, [boolean $include_unused_fields = false])
?array _read_join (integer &$at, array $tokens, string $query, array $db, boolean $fail_ok, integer &$closing_brackets_needed)
?array _read_record (PATH $path, [?array $schema = NULL], [?array $must_contain_strings = NULL], [boolean $include_unused_fields = false])
?array _read_schema (array $db, string $table_name, [boolean $fail_ok = false])
array _setify_join_condition_for_optimisation (array $join_condition, array $schema, array $records, string $joined_as)
array _turn_where_expr_to_map (array $where_expr, string $table_as, [?array $schema = NULL], [boolean $not_full_accuracy = false])
void _type_check (array $schema, array $record, string $query)
string _unescape_name (string $in)
void _write_record (array $db, string $table_name, string $guid, array $record, [boolean $fail_ok = false], [boolean $save_as_volatile = false])
void _write_records (array $db, string $table_name, array $records, [boolean $fail_ok = false])
Methods
can_arbitrary_groupby (line 128)

Find whether the database may run GROUP BY unfettered with restrictions on the SELECT'd fields having to be represented in it or aggregate functions

  • return: Whether it can
boolean can_arbitrary_groupby ()
db_change_primary_key (line 216)

Change the primary key of a table.

void db_change_primary_key (ID_TEXT $table_name, array $new_key, array $db)
  • ID_TEXT $table_name: The name of the table to create the index on
  • array $new_key: A list of fields to put in the new key
  • array $db: The DB connection to make on
db_close_connections (line 363)

Close the database connections. We don't really need to close them (will close at exit), just disassociate so we can refresh them.

void db_close_connections ()
db_create_index (line 204)

Create a table index.

void db_create_index (ID_TEXT $table_name, ID_TEXT $index_name, string $_fields, array $db)
  • ID_TEXT $table_name: The name of the table to create the index on
  • ID_TEXT $index_name: The index name (not really important at all)
  • string $_fields: Part of the SQL query: a comma-separated list of fields to use on the index
  • array $db: The DB connection to make on
db_create_table (line 243)

Create a new table.

void db_create_table (ID_TEXT $table_name, array $fields, array $db, [boolean $if_not_exists = false])
  • ID_TEXT $table_name: The table name
  • array $fields: A map of field names to ocPortal field types (with *#? encodings)
  • array $db: The DB connection to make on
  • boolean $if_not_exists: Whether to only do it if it does not currently exist
db_default_password (line 148)

Get the default password for making db connections (used by the installer as a default).

  • return: The default password for db connections
string db_default_password ()
db_default_user (line 138)

Get the default user for making db connections (used by the installer as a default).

  • return: The default user for db connections
string db_default_user ()
db_drop_if_exists (line 309)

Delete a table.

void db_drop_if_exists (ID_TEXT $table_name, array $db)
  • ID_TEXT $table_name: The table name
  • array $db: The DB connection to delete on
db_empty_is_null (line 298)

This function is internal to the database system, allowing SQL statements to be build up appropriately. Some databases require IS NULL to be used to check for blank strings.

  • return: Whether a blank string IS NULL
boolean db_empty_is_null ()
db_encode_like (line 355)

Encode a LIKE string comparision fragement for the database system. The pattern is a mixture of characters and ? and % wilcard symbols.

  • return: The encoded pattern
string db_encode_like (string $pattern)
  • string $pattern: The pattern
db_escape_string (line 438)

Escape a string so it may be inserted into a query. If SQL statements are being built up and passed using db_query then it is essential that this is used for security reasons. Otherwise, the abstraction layer deals with the situation.

  • return: The escaped string
string db_escape_string (string $string)
  • string $string: The string
db_full_text_assemble (line 417)

Assemble part of a WHERE clause for doing full-text search

  • return: Part of a WHERE clause for doing full-text search
string db_full_text_assemble (string $content, boolean $boolean)
  • string $content: Our match string
  • boolean $boolean: Whether to do a boolean full text search
db_get_connection (line 378)

Get a database connection. This function shouldn't be used by you, as a connection to the database is established automatically.

  • return: A database connection (NULL: failed)
?array db_get_connection (boolean $persistent, string $db_name, string $db_host, string $db_user, string $db_password, [boolean $fail_ok = false])
  • boolean $persistent: Whether to create a persistant connection
  • string $db_name: The database name
  • string $db_host: The database host (the server)
  • string $db_user: The database connection username
  • string $db_password: The database connection password
  • boolean $fail_ok: Whether to on error echo an error and return with a NULL, rather than giving a critical error
db_get_first_id (line 230)

Get the ID of the first row in an auto-increment table (used whenever we need to reference the first).

  • return: First ID used
integer db_get_first_id ()
db_get_type_remap (line 169)

Get a map of ocPortal field types, to actual mySQL types.

  • return: The map
array db_get_type_remap ()
db_has_full_text (line 405)

Find whether full-text-search is present

  • return: Whether it is
boolean db_has_full_text (array $db)
  • array $db: A DB connection
db_has_full_text_boolean (line 427)

Find whether full-text-boolean-search is present

  • return: Whether it is
boolean db_has_full_text_boolean ()
db_has_subqueries (line 159)

Find whether subquery support is present

  • return: Whether it is
boolean db_has_subqueries (array $db)
  • array $db: A DB connection
db_is_flat_file_simple (line 344)

Determine whether the database is a flat file database, and thus not have a meaningful connect username and password.

  • return: Whether the database is a flat file database
boolean db_is_flat_file_simple ()
db_query (line 456)

This function is a very basic query executor. It shouldn't usually be used by you, as there are abstracted versions available.

  • return: The results (NULL: no results), or the insert ID
?mixed db_query (string $query, array $db, [?integer $max = NULL], [?integer $start = NULL], [boolean $fail_ok = false], [boolean $get_insert_id = false], [boolean $no_syndicate = false], [boolean $save_as_volatile = false])
  • string $query: The complete SQL query
  • array $db: A DB connection
  • ?integer $max: The maximum number of rows to affect (NULL: no limit)
  • ?integer $start: The start row to affect (NULL: no specification)
  • boolean $fail_ok: Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
  • boolean $get_insert_id: Whether to get the autoincrement ID created for an insert query
  • boolean $no_syndicate: Whether to force the query to execute on the XML database driver (won't optimise by using MySQL). Useful for calls happening for multi-part queries from within this DB driver
  • boolean $save_as_volatile: Whether we are saving as a 'volatile' file extension
db_string_equal_to (line 276)

Encode an SQL statement fragment for a conditional to see if two strings are equal.

  • return: The SQL
string db_string_equal_to (ID_TEXT $attribute, string $compare)
  • ID_TEXT $attribute: The attribute
  • string $compare: The comparison
db_string_not_equal_to (line 288)

Encode an SQL statement fragment for a conditional to see if two strings are not equal.

  • return: The SQL
string db_string_not_equal_to (ID_TEXT $attribute, string $compare)
  • ID_TEXT $attribute: The attribute
  • string $compare: The comparison
is_start_of_delimiter (line 687)

See if an item is a prefix to something in the delimiter array.

  • return: Whether it is
boolean is_start_of_delimiter (string $looking)
  • string $looking: The item
_bad_query (line 3347)

Give out an error message and die, when a query fails.

  • return: Always returns null (NULL: error)
?mixed _bad_query (string $query, [boolean $fail_ok = false], [?string $error = NULL])
  • string $query: The query that failed
  • boolean $fail_ok: Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
  • ?string $error: Error message (NULL: none)
_delete_record (line 1405)

Write a record to an XML file.

void _delete_record (PATH $path, array $db)
  • PATH $path: The file path
  • array $db: Database connection
_do_query_alter (line 1528)

Execute an ALTER query.

  • return: The results (NULL: no results)
?mixed _do_query_alter (array $tokens, string $query, array $db, boolean $fail_ok)
  • array $tokens: Tokens
  • string $query: Query that was executed
  • array $db: Database connection
  • boolean $fail_ok: Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
_do_query_create (line 1678)

Execute a CREATE query.

  • return: The results (NULL: no results)
?mixed _do_query_create (array $tokens, string $query, array $db, boolean $fail_ok)
  • array $tokens: Tokens
  • string $query: Query that was executed
  • array $db: Database connection
  • boolean $fail_ok: Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
_do_query_delete (line 2316)

Execute a DELETE query.

  • return: The results (NULL: no results)
?mixed _do_query_delete (array $tokens, string $query, array $db, ?integer $max, ?integer $start, boolean $fail_ok)
  • array $tokens: Tokens
  • string $query: Query that was executed
  • array $db: Database connection
  • ?integer $max: The maximum number of rows to affect (NULL: no limit)
  • ?integer $start: The start row to affect (NULL: no specification)
  • boolean $fail_ok: Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
_do_query_drop (line 1493)

Execute a DROP query.

  • return: The results (NULL: no results)
?mixed _do_query_drop (array $tokens, string $query, array $db, boolean $fail_ok)
  • array $tokens: Tokens
  • string $query: Query that was executed
  • array $db: Database connection
  • boolean $fail_ok: Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
_do_query_insert (line 1755)

Wrapper to execute an INSERT query.

  • return: The insert ID (NULL: not requested / error)
?mixed _do_query_insert (array $tokens, string $query, array $db, boolean $fail_ok, boolean $get_insert_id, ?integer &$random_key, [boolean $save_as_volatile = false])
  • array $tokens: Tokens
  • string $query: Query that was executed
  • array $db: Database connection
  • boolean $fail_ok: Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
  • boolean $get_insert_id: Whether to get the autoincrement ID created for an insert query
  • ?integer &$random_key: The random key that we would use (NULL: not generated yet)
  • boolean $save_as_volatile: Whether we are saving as a 'volatile' file extension
_do_query_insert__execute (line 1838)

Execute an INSERT query.

  • return: The insert ID (NULL: not requested / error)
?mixed _do_query_insert__execute (array $inserts, ID_TEXT $table_name, string $query, array $db, boolean $fail_ok, boolean $get_insert_id, ?integer &$random_key, [boolean $save_as_volatile = false])
  • array $inserts: Rows being inserted
  • ID_TEXT $table_name: Table name we're inserting into
  • string $query: Query that was executed
  • array $db: Database connection
  • boolean $fail_ok: Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
  • boolean $get_insert_id: Whether to get the autoincrement ID created for an insert query
  • ?integer &$random_key: The random key that we would use (NULL: not generated yet)
  • boolean $save_as_volatile: Whether we are saving as a 'volatile' file extension
_do_query_insert__parse (line 1772)

Parse an INSERT query.

  • return: A pair: the table, and the rows to insert (NULL: error)
?array _do_query_insert__parse (array $tokens, string $query, array $db, boolean $fail_ok)
  • array $tokens: Tokens
  • string $query: Query that was executed
  • array $db: Database connection
  • boolean $fail_ok: Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
_do_query_select (line 2376)

Execute a SELECT query.

  • return: The results (NULL: no results)
?mixed _do_query_select (array $tokens, string $query, array $db, ?integer $max, ?integer $start, boolean $fail_ok, integer &$at, [boolean $do_end_check = true])
  • array $tokens: Tokens
  • string $query: Query that was executed
  • array $db: Database connection
  • ?integer $max: The maximum number of rows to affect (NULL: no limit)
  • ?integer $start: The start row to affect (NULL: no specification)
  • boolean $fail_ok: Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
  • integer &$at: Our offset counter
  • boolean $do_end_check: Whether to not do the check to make sure we've parsed everything
_do_query_update (line 2235)

Execute an UPDATE query.

  • return: The results (NULL: no results)
?mixed _do_query_update (array $tokens, string $query, array $db, ?integer $max, ?integer $start, boolean $fail_ok)
  • array $tokens: Tokens
  • string $query: Query that was executed
  • array $db: Database connection
  • ?integer $max: The maximum number of rows to affect (NULL: no limit)
  • ?integer $start: The start row to affect (NULL: no specification)
  • boolean $fail_ok: Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
_escape_name (line 3436)

Escape a value for use in a filesystem path.

  • return: Escaped value
string _escape_name (string $in)
  • string $in: Value to escape (original value)
_execute_expression (line 2122)

Execute an expression.

  • return: The result (NULL: error/NULL)
?mixed _execute_expression (array $expr, array $bindings, string $query)
  • array $expr: The expression
  • array $bindings: Bindings available in the execution scope
  • string $query: Query that was executed
_execute_join (line 3129)

Get results from a JOIN.

  • return: A pair: an array of results, an array of the schema for what has been joined (NULL: error)
?array _execute_join (array $db, string $joined_as_prior, array $join, string $query, array $records, array $schema, array $where_expr, [boolean $fail_ok = false])
  • array $db: Database connection
  • string $joined_as_prior: The renaming of our table, so we can recognise it in the join condition
  • array $join: Join op-tree
  • string $query: Query that was executed
  • array $records: Records so far
  • array $schema: Schema so far
  • array $where_expr: Expression filtering results (used for optimisation, seeing if we can get a quick key match)
  • boolean $fail_ok: Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
_function_set_scoping (line 2894)

Run SQL data filter functions over a result set.

  • return: The result row based on the set
array _function_set_scoping (array $set, array $select, array $rep, string $query)
  • array $set: The set of results we are operating on
  • array $select: Parse tree of what we are selecting
  • array $rep: Record we are copying the function results into
  • string $query: Query that was executed
_guid (line 3368)

Generate a GUID for a record, preferably from the key, but doesn't have to be.

  • return: The GUID
string _guid ([?array $schema = NULL], [?array $record = NULL])
  • ?array $schema: The schema (NULL: don't have/use)
  • ?array $record: The record (NULL: don't have/use)
_key_conflict_check (line 1457)

Check to see if there is a key conflict problem.

  • return: Whether there was a conflict
boolean _key_conflict_check (array $db, string $table_name, array $schema, array $record, string $query, boolean $fail_ok, [?string $existing_identity = NULL])
  • array $db: Database connection
  • string $table_name: The table name
  • array $schema: The schema
  • array $record: The record
  • string $query: Query that was executed
  • boolean $fail_ok: Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
  • ?string $existing_identity: The GUID representing what we have now (so we don't think we're conflicting with ourself) (NULL: not yet added)
_parsing_check_ended (line 3324)

Check we've consumed all our tokens.

  • return: Success status
boolean _parsing_check_ended (integer $at, array $tokens, string $query, [boolean $fail_ok = false])
  • integer $at: Our offset counter
  • array $tokens: Tokens
  • string $query: Query that was executed
  • boolean $fail_ok: Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
_parsing_expects (line 3304)

Expect a certain token next.

  • return: Success status
boolean _parsing_expects (integer &$at, array $tokens, string $token, string $query, [boolean $fail_ok = false])
  • integer &$at: Our offset counter
  • array $tokens: Tokens
  • string $token: Token expected
  • string $query: Query that was executed
  • boolean $fail_ok: Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
_parsing_read (line 3281)

Reads the next token.

  • return: Token read (NULL: error, read too far)
?string _parsing_read (integer &$at, array $tokens, string $query, [boolean $fail_ok = false])
  • integer &$at: Our offset counter
  • array $tokens: Tokens
  • string $query: Query that was executed
  • boolean $fail_ok: Whether it can return NULL if we're out of output (otherwise fails)
_parsing_read_expression (line 1901)

Parse an SQL expression.

  • return: The expression (NULL: error)
?array _parsing_read_expression (integer &$at, array $tokens, string $query, array $db, [boolean $look_for_connectives = true], [boolean $look_for_any_connectives = true], [boolean $fail_ok = false])
  • integer &$at: Our offset counter
  • array $tokens: Tokens
  • string $query: Query that was executed
  • array $db: Database connection
  • boolean $look_for_connectives: Whether to work as a connection point to seek out logic connection expression parts
  • boolean $look_for_any_connectives: Whether to work as a connection point to seek out arithmetic connection expression parts
  • boolean $fail_ok: Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
_read_all_records (line 866)

Read in all the records from a table.

  • return: The collected records (NULL: error)
?array _read_all_records (array $db, string $table_name, string $table_as, ?array $schema, ?array $where_expr, boolean $fail_ok, string $query, [boolean $include_unused_fields = false])
  • array $db: Database connection
  • string $table_name: The table name
  • string $table_as: What the table will be renamed to (blank: N/A)
  • ?array $schema: Schema to type-set against (NULL: do not do type-setting)
  • ?array $where_expr: Expression filtering results (used for optimisation, seeing if we can get a quick key match) (NULL: no data to filter with)
  • boolean $fail_ok: Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
  • string $query: Query that was executed
  • boolean $include_unused_fields: Whether to include fields that are present in the actual records but not in our schema
_read_join (line 2994)

Read in a table specifier clause for a WHERE query.

  • return: Join condition (NULL: no join here)
?array _read_join (integer &$at, array $tokens, string $query, array $db, boolean $fail_ok, integer &$closing_brackets_needed)
  • integer &$at: Our offset counter
  • array $tokens: Tokens
  • string $query: Query that was executed
  • array $db: Database connection
  • boolean $fail_ok: Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
  • integer &$closing_brackets_needed: How many closing brackets we expect
_read_record (line 1162)

Read a record from an XML file.

  • return: The record map (NULL: does not contain requested substrings)
?array _read_record (PATH $path, [?array $schema = NULL], [?array $must_contain_strings = NULL], [boolean $include_unused_fields = false])
  • PATH $path: The file path
  • ?array $schema: Schema to type-set against (NULL: do not do type-setting)
  • ?array $must_contain_strings: Substrings to check it is in, used for performance (NULL: none)
  • boolean $include_unused_fields: Whether to include fields that are present in the actual records but not in our schema
_read_schema (line 712)

Find the schema for a table.

  • return: The schema map (NULL: not found)
?array _read_schema (array $db, string $table_name, [boolean $fail_ok = false])
  • array $db: The database
  • string $table_name: The table name
  • boolean $fail_ok: Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
_setify_join_condition_for_optimisation (line 3082)

Optimize a join condition into a join scope set, if possible.

  • return: Altered join condition
array _setify_join_condition_for_optimisation (array $join_condition, array $schema, array $records, string $joined_as)
  • array $join_condition: Join condition (parsed WHERE-style clause)
  • array $schema: Schema so far
  • array $records: Records so far
  • string $joined_as: The renaming of our table, so we can recognise it in the join condition
_turn_where_expr_to_map (line 1093)

Take an expression and do our best to collapse it into a fixed mapping of stuff we know we are going to AND.

  • return: AND map
array _turn_where_expr_to_map (array $where_expr, string $table_as, [?array $schema = NULL], [boolean $not_full_accuracy = false])
  • array $where_expr: The expression parse tree
  • string $table_as: What the table will be renamed to (blank: N/A)
  • ?array $schema: Schema to type-set against (NULL: do not do type-setting)
  • boolean $not_full_accuracy: Whether to do a not-full-accurate search
_type_check (line 795)

Type check some data destined to go into a table.

void _type_check (array $schema, array $record, string $query)
  • array $schema: The schema
  • array $record: The data
  • string $query: Query that was executed
_unescape_name (line 3447)

Unescape a value from a filesystem path back to the original.

  • return: Original value
string _unescape_name (string $in)
  • string $in: Escaped value
_write_record (line 1324)

Write a record to an XML file.

void _write_record (array $db, string $table_name, string $guid, array $record, [boolean $fail_ok = false], [boolean $save_as_volatile = false])
  • array $db: Database connection
  • string $table_name: The table name
  • string $guid: The GUID
  • array $record: The record map
  • boolean $fail_ok: Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
  • boolean $save_as_volatile: Whether we are saving as a 'volatile' file extension
_write_records (line 1305)

Write in all the records to a table.

void _write_records (array $db, string $table_name, array $records, [boolean $fail_ok = false])
  • array $db: Database connection
  • string $table_name: The table name
  • array $records: The list of record maps
  • boolean $fail_ok: Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)

Documentation generated on Sun, 02 Jan 2011 23:29:28 +0000 by phpDocumentor 1.4.3