Interface MySQL
access this type via: data.mysql.MySQL (provides, requires or uses)
MySQL database driver.
Functions
MySQL(char host[], int port, char user[], char pass[], char dbName[])
bool execute(char query[])
MySQLRow[] fetchAll()
void close()
MySQL(char host[], int port, char user[], char pass[], char dbName[])
Create a new MySQL connection.
host The host ip address where the database is running.
port The port number.
user The user name to connect to the database.
pass The password to connect to the database.
dbName The database name. This can be left blank, in case the database name will be provided later on.
bool execute(char query[])
Executes a query to the database, returning true if the query is successfully executed, and false otherwise.
MySQLRow[] fetchAll()
After executing a query that return results (e.g. SELECT * FROM ), this function returns the query data result.
void close()
Closes the database connection. Very important to avoid \"too many connections\" exception.