/examples/functions.inc.php

Description

Set of functions used in the db_SQLite examples.

Includes
require_once ('../db_sqlite.class.php') (line 18)

Load in the class definition based on used PHP version.

Functions
CheckForDBobject (line 64)

Checks if given Object name exists inside the database.

If checked object does not exist function can auto create the object if required DML is supplied

  • return: TRUE if Object exists else false.
bool CheckForDBobject (mixed &$dbh, string $objectname, [string $dml_sql = ''])
  • mixed &$dbh: The database object.
  • string $objectname: Name of object to check.
  • string $dml_sql: Required SQL to create the object if it does not exist.
DBFooter (line 51)

Prints out the amount of queries and the time required to process them.

void DBFooter (string $lf, mixed &$dbh)
  • string $lf: The linefeed character to use.
  • mixed &$dbh: The database object.
WhichBR (line 28)

Returns an associative array with sapi-type name and required line break char.

Use this function to retrieve the required line-break character for both the browser output and shell output. Currently only two keys are included:

  • "SAPI" => The sapi type of PHP (i.e. "cli")
  • "LF" => The line-break character to use (i.e. "
    ")

  • return: The associative array as described.
array WhichBR ()

Documentation generated on Sat, 07 Aug 2010 20:01:03 +0200 by phpDocumentor 1.4.3