Class Database_Static_mysql

Description
  • copyright: ocProducts Ltd

Located in /sources/database/mysql.php (line 35)

Database_super_mysql
   |
   --Database_Static_mysql
Method Summary
string db_escape_string (string $string)
?array db_get_connection (boolean $persistent, string $db_name, string $db_host, string $db_user, string $db_password, [boolean $fail_ok = false])
array db_get_query_rows (resource $results)
boolean db_has_collate_settings (array $db)
boolean db_has_full_text (array $db)
boolean db_has_subqueries (array $db)
?mixed db_query (string $query, array $db_parts, [?integer $max = NULL], [?integer $start = NULL], [boolean $fail_ok = false], [boolean $get_insert_id = false])
Methods
db_escape_string (line 173)

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_get_connection (line 49)

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 (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: 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_query_rows (line 273)

Get the rows returned from a SELECT query.

  • return: A list of row maps
array db_get_query_rows (resource $results)
  • resource $results: The query result pointer
db_has_collate_settings (line 152)

Find whether collate support is present

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

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 162)

Find whether full-text-boolean-search is present

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

Find whether subquery support is present

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

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_parts, [?integer $max = NULL], [?integer $start = NULL], [boolean $fail_ok = false], [boolean $get_insert_id = false])
  • string $query: The complete SQL query
  • array $db_parts: 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 output an error on failure
  • boolean $get_insert_id: Whether to get the autoincrement ID created for an insert query

Inherited Methods

Inherited From Database_super_mysql

Database_super_mysql::can_arbitrary_groupby()
Database_super_mysql::db_change_primary_key()
Database_super_mysql::db_close_connections()
Database_super_mysql::db_create_index()
Database_super_mysql::db_create_table()
Database_super_mysql::db_default_password()
Database_super_mysql::db_default_user()
Database_super_mysql::db_drop_if_exists()
Database_super_mysql::db_empty_is_null()
Database_super_mysql::db_encode_like()
Database_super_mysql::db_full_text_assemble()
Database_super_mysql::db_get_first_id()
Database_super_mysql::db_get_type_remap()
Database_super_mysql::db_has_expression_ordering()
Database_super_mysql::db_is_flat_file_simple()
Database_super_mysql::db_string_equal_to()
Database_super_mysql::db_string_not_equal_to()
Database_super_mysql::using_innodb()

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