Inheritance diagram for mysql:
Public Member Functions | |
mysql ($host, $login, $password, $database) | |
creates object, connect to mysql database, and use database | |
connected () | |
return if the connection is up with the base | |
escapeString ($str) | |
escape a string so that it is safe to include it in a query | |
setError () | |
retrieve last error from database | |
createTable ($query, $charset) | |
creates a table | |
execute ($query) | |
executes an sql query | |
insertAndGetId ($query) | |
do an insert and retrieve generated id | |
select1 ($query) | |
do a select that yields one row | |
select ($query) | |
do a select that yields multiple row | |
close () | |
close this connection | |
tableExists ($table_name) | |
checks if a table exists | |
Public Attributes | |
$host | |
host to connect to | |
$login | |
login to use | |
$password | |
plain text password to use | |
$database | |
database to use | |
$id | |
database handle |
This file is based on the DotClear class.mysql.php
mysql::close | ( | ) |
mysql::connected | ( | ) |
return if the connection is up with the base
Reimplemented from db_connection.
mysql::createTable | ( | $ | query, | |
$ | charset | |||
) |
creates a table
query | query that contains the create table sql statement | |
charset | default charset of MySql table |
Reimplemented from db_connection.
mysql::escapeString | ( | $ | str | ) |
escape a string so that it is safe to include it in a query
should be called by user code to escape all user provided variables
str | the string to escape |
Reimplemented from db_connection.
mysql::execute | ( | $ | query | ) |
executes an sql query
query | the query to execute (INSERT, UPDATE, DELETE) |
Reimplemented from db_connection.
mysql::insertAndGetId | ( | $ | query | ) |
do an insert and retrieve generated id
query | the insert query |
Reimplemented from db_connection.
mysql::mysql | ( | $ | host, | |
$ | login, | |||
$ | password, | |||
$ | database | |||
) |
creates object, connect to mysql database, and use database
mysql::select | ( | $ | query | ) |
do a select that yields multiple row
query | the select that returns only one row |
Reimplemented from db_connection.
mysql::select1 | ( | $ | query | ) |
do a select that yields one row
query | the select that returns only one row |
Reimplemented from db_connection.
mysql::setError | ( | ) |
mysql::tableExists | ( | $ | table_name | ) |
mysql::$database |
database to use
mysql::$host |
host to connect to
mysql::$id |
database handle
mysql::$login |
login to use
mysql::$password |
plain text password to use