Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: /home/mitarbeiter/sven/public_html/tmp/devcon_php_base/dbi/dbctrl.class
dev/con php base - Database interfaces

DBCtrl

DBWrapper
   |
  +-- DBCtrl

Common SQL interface

 

public class DBCtrl extends DBWrapper

Common SQL interface
Applications communicate with SQL databases of different flavourstransparently through this class.

Authors
Copyrightdev/consulting GmbH

 
Direct known subclasses: DBI

Methods inherited from DBWrapper

&dbwrapper, create_db, drop_db, create_table, &query, insert_id, close, error, is_connected

Public Method Summary

void

&DBCtrl(string $dbname, string $host, string $user, string $passwd)

Set up a database connection or reuse an existing one.
object db_result

&select(string $what)

Select a result set from database.
object db_result

&update(string $table, string $set, string $where)

Update rows in a table.
object db_result

&insert(string $table)

insert a new row.
object db_result

&delete(string $table, [ string $where ])

Remove row(s) from a table.
void

set_table_prefix(string $prefix)

Set prefix for all table names used afterwards.
string

table_prefix(string $table)

Get table prefix used for all table names.

Fields inherited from DBWrapper

$_db, $_db_name, $_last_result

Private Field Summary

unknown

$db_name

unknown

$prefix

Private Constant Summary

__DBI_DBCTRL_CLASS >>true<< Warning: documentation is missing.

Public Method Details

&DBCtrl

public void &DBCtrl( string $dbname, string $host, string $user, string $passwd )

  Set up a database connection or reuse an existing one.

Parameter
string $dbname
Name of the database to connect to.
string $host
Host which to connect.
string $user
User name.
string $passwd
Password.
Returns void


&select

public object db_result &select( string $what )

  Select a result set from database.
This function generates a query of the form"SELECT $what FROM $table WHERE $where $tail".

Parameter
string $what
Name of the database to connect to.
Returns object db_result


&update

public object db_result &update( string $table, string $set, string $where )

  Update rows in a table.
This function generates a query of the form"UPDATE $table SET $set WHERE $where".

Parameter
string $table
Table name.
string $set
Field set without SET clause.
string $where
WHERE clause without WHERE keyword.
Returns object db_result


&insert

public object db_result &insert( string $table )

  insert a new row.
This function generates a query of the form"UPDATE $table SET $set WHERE $where".

Parameter
string $table
Table name.
Returns object db_result


&delete

public object db_result &delete( string $table, [ string $where ] )

  Remove row(s) from a table.
This function generates a query of the form"DELETE FROM $table WHERE $where".

Parameter
string $table
Table name.
string $where = >>''<<
WHERE clause without WHERE keyword.
Returns object db_result


set_table_prefix

public void set_table_prefix( string $prefix )

  Set prefix for all table names used afterwards.

Parameter
string $prefix
Table name.
Returns void


table_prefix

public string table_prefix( string $table )

  Get table prefix used for all table names.

Parameter
string $table
Warning: documentation is missing.
Returns string

table Table name.


Private Field Details

$db_name

private unknown $db_name

>><<



$prefix

private unknown $prefix

>><<



Private Constant Details

__DBI_DBCTRL_CLASS

define( __DBI_DBCTRL_CLASS, >>true<< )
Case: default: case sensitive




Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta