/sources/database.php

Description
Classes
Class Description
database_driver
Functions
can_arbitrary_groupby (line 103)

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_encode_like (line 161)

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

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

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_first_id (line 126)

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_has_expression_ordering (line 208)

Find whether expression ordering support is present

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

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_subqueries (line 189)

Find whether subquery support is present

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

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

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
get_db_forums (line 328)

Get the name of the forum database.

  • return: The forum database site
string get_db_forums ()
get_db_forums_host (line 317)

Get the host of the forum database ('localhost', for example).

  • return: The database host
string get_db_forums_host ()
get_db_forums_password (line 353)

Get the forum database password.

  • return: The forum database password
string get_db_forums_password ()
get_db_forums_user (line 340)

Get the forum database username.

  • return: The forum database username
string get_db_forums_user ()
get_db_site (line 282)

Get the name of the database.

  • return: The database site
string get_db_site ()
get_db_site_host (line 271)

Get the host of the database ('localhost', for example).

  • return: The database host
string get_db_site_host ()
get_db_site_password (line 306)

Get the database password.

  • return: The database password
string get_db_site_password ()
get_db_site_user (line 294)

Get the database username.

  • return: The database username
string get_db_site_user ()
get_db_type (line 236)

Get the type of database installed, such as MySQL, or Oracle.

  • return: The database type
string get_db_type ()
get_table_prefix (line 259)

Get the table prefixes used for all ocPortal tables, commonly used when you are installing ocPortal in the same database as your forums. The default table prefix is 'ocp4_'. Note that anything that might write to an arbitrary db, must ask that db for it's table prefix (if it needs it of course... the db abstracts away most needs for it)

  • return: The table prefix
string get_table_prefix ()
get_use_persistent (line 248)

Find ocPortal was installed to use persistent database connections or not.

  • return: Whether to use persistent database connections
boolean get_use_persistent ()
init__database (line 24)

Standard code module initialisation function.

void init__database ()
microtime_diff (line 368)

Get the time difference in microseconds between two PHP microtimes.

Original source: php.net

  • return: The time difference
float microtime_diff (string $a, string $b)
  • string $a: First microtime
  • string $b: Second microtime
_general_db_init (line 71)

Called once our DB connection becomes active.

void _general_db_init ()

Documentation generated on Sun, 02 Jan 2011 23:12:45 +0000 by phpDocumentor 1.4.3