Class fwDbEngin

Description

A class who provide a engin to interract with the a database

  • author: $Author: jderusse $
  • version: $Rev: 1676 $ ($Date: 2007-11-05 16:54:11 +0100 (lun., 05 nov. 2007) $)
  • copyright: 2007 - JetMultimedia France - http://www.jetmultimedia.fr
  • license: GNU Public License

Located in /fw/db/dbEngin.class.php5 (line 30)


	
			
Variable Summary
 static bool $dieOnError
 static mixed $error
 string $database
 string $host
 int $link
 string $login
 string $password
Method Summary
 fwDbEngin __construct ([string $host = ''], [string $login = ''], [string $password = ''], [string $database = ''])
 int|null connect ()
 mixed getCell (string $sql_query)
 array|null getData (string $sql_query, [ $result_type = MYSQL_ASSOC])
 array|null getFields (string $table_name)
 array|null getIndexes (string $table_name)
 array|null getRow (string $sql_query, [ $result_type = MYSQL_ASSOC])
 array getTables ()
 int insertedId ()
 int setData (string $sql_query)
Variables
static bool $dieOnError = true (line 37)

determinate if the engine should DIE when a query fire an mysql error

  • access: public
static mixed $error = null (line 44)

Last mysql error fired

string

  • access: public
string $database = '' (line 69)

SGDB name

  • access: public
string $host = '' (line 55)

SGDB Host (IP or Name)

  • access: public
int $link = null (line 77)

Connector to the database

  • access: private
string $login = '' (line 60)

SGDB Login

  • access: public
string $password = '' (line 65)

SGDB Password

  • access: public
Methods
Constructor __construct (line 88)

Create an new instance of the class

  • access: public
fwDbEngin __construct ([string $host = ''], [string $login = ''], [string $password = ''], [string $database = ''])
  • string $host: SGDB Host
  • string $login: SGDB Login
  • string $password: SGDB Password
  • string $database: Database
connect (line 101)

Open a connection to the server

  • access: private
int|null connect ()
getCell (line 253)

To retreive the first cell of the first row of a query

  • access: public
mixed getCell (string $sql_query)
  • string $sql_query: query to execute
getData (line 180)

To retreive the contents of a query

  • access: public
array|null getData (string $sql_query, [ $result_type = MYSQL_ASSOC])
  • string $sql_query: query to execute
  • $result_type
getFields (line 135)

Gets the list of fields

  • access: public
array|null getFields (string $table_name)
  • string $table_name: name of the table
getIndexes (line 163)

Gets the list of indexes

  • access: public
array|null getIndexes (string $table_name)
  • string $table_name: nom de la table
getRow (line 215)

To retreive the first row of a query

  • access: public
array|null getRow (string $sql_query, [ $result_type = MYSQL_ASSOC])
  • string $sql_query: query to execute
  • $result_type
getTables (line 150)

Gets the list of tables

  • access: public
array getTables ()
insertedId (line 300)

Gets the ID generated from the previous INSERT operation

  • access: public
int insertedId ()
setData (line 273)

Sends an SQL query to MySQL (INSERT, UPDATE, DELETE...)

  • access: public
int setData (string $sql_query)
  • string $sql_query: query to execute

Documentation generated on Thu, 15 Nov 2007 14:49:17 +0100 by phpDocumentor 1.4.0a2