|
|
File: ../general-devel/lib/support/db/db.class.php
phpGeneral - support
DB
DB
Base class for db api
|
private class DB extends Locale
Base class for db api
The db api is build upon the dbx library functions provided by php.
|
|
Direct known subclasses: DBPgSQL, DBMySQL
|
|
|
|
Private Field Summary |
integer |
$link |
|
|
Public Method Details |
query |
public boolean query( string $statement, int $flags, object Result &$result, string &$errmsg )
|
|
Executes a query on the database
See http://www.php.net/manual/en/function.dbx-query.php for a descriptionof this function and its parameters.
|
Parameter |
|
string |
$statement |
|
|
SQL statement understood by the database server |
|
|
int |
$flags |
|
|
Flags for changing the output format |
|
|
object Result |
&$result |
|
|
) &$result Reference for storing the result object returned by the server |
|
|
string |
&$errmsg |
|
|
Reference for storing error messages in case of a failure |
|
Returns |
boolean True on success, false otherwise |
|
|
Private Method Details |
DB |
private object DB DB( array $param, string $type, string &$errmsg )
|
|
Class constructor
Initializes localization support for error messages and connects to adatabase server specified by the host name (or ip address), the port andthe type of the server. It also tries to authenticate the user byproviding the given password of the user to the server.
|
Parameter |
|
array |
$param |
|
|
Associative array contains userid, password, realm and others |
|
|
string |
$type |
|
|
Type of the database, like "pgsql" or "mysql" |
|
|
string |
&$errmsg |
|
|
Reference for storing error messages in case of a failure |
|
Returns |
object DB |
|
_DB |
private void _DB( )
|
|
Class destructor
Closes the connection to the database server
|
Returns |
void |
|
|
Private Field Details |
$link |
private integer $link
>> <<
|
|
|
|
|
|
PHPDoc 1.0beta |