Database_mysql Class Reference

Inheritance diagram for Database_mysql:

Database

List of all members.


Detailed Description

Database connection class for mysql.

/*

Definition at line 34 of file mysql.php.


Public Member Functions

 __construct ($db_name, $login, $password, $server='localhost', $port=NULL, $options=NULL)
 Constructor.
 Database_mysql ($db_name, $login, $password, $server='localhost')
 Legacy constructor /*.
 escape ($string)
 Escapes a string and returns it with added quotes.
prepare ($query)
 Returns an un-executed Database_Query_mysql object.
 _errstr ()
 _errno ()
 server_info ()
 close ()

Constructor & Destructor Documentation

Database_mysql::__construct ( db_name,
login,
password,
server = 'localhost',
port = NULL,
options = NULL 
)

Constructor.

Parameters:
string $db_name Name of the database we're connecting to
string $login Login name to use when connecting
string $password Password to use when connecting
string $server Database server to connect to (Default: localhost)
string $port Port or socket address to connect to /*

Definition at line 45 of file mysql.php.


Member Function Documentation

Database_mysql::Database_mysql ( db_name,
login,
password,
server = 'localhost' 
)

Legacy constructor /*.

Definition at line 70 of file mysql.php.

Database_mysql::escape ( string  ) 

Escapes a string and returns it with added quotes.

On top of normal escaping, this also escapes ? characters so it's safe to use in other db queries.

Parameters:
string $string string to escape
Returns:
string escaped string /*

Definition at line 82 of file mysql.php.

& Database_mysql::prepare ( query  ) 

Returns an un-executed Database_Query_mysql object.

Parameters:
string $query The query string
Returns:
Database_Query_mysql /*

Definition at line 97 of file mysql.php.

Database_mysql::_errstr (  ) 

Returns:
string The most recent error string /*

Definition at line 105 of file mysql.php.

Database_mysql::_errno (  ) 

Returns:
int The most recent error number /*

Definition at line 112 of file mysql.php.

Database_mysql::server_info (  ) 

Returns:
string Information about the mysql server /*

Definition at line 119 of file mysql.php.

Database_mysql::close ( void   ) 

Returns:
bool true on success /*

Definition at line 126 of file mysql.php.


The documentation for this class was generated from the following file:

Generated on Sat Dec 18 05:16:01 2010 for MythTV by  doxygen 1.5.5