Helper functions for dealing with MySQL.
This file is part of Ratatöskr. Ratatöskr is licensed unter the MIT / X11 License. See “ratatoeskr/licenses/ratatoeskr” for more information.
ratatoeskr/ | Helper functions for dealing with MySQL. |
Functions | |
db_connect | Establish a connection to the MySQL database. |
sub_prefix | Substitutes “PREFIX_” in the input string with the prefix from the config. |
prep_stmt | Prepares a SQL statement using the global DB connection. |
qdb | Prepares statement (1st argument) with prep_stmt and executes it with the remaining arguments. |
Transaction | Makes using transactions easier. |
Functions | |
__construct | Start a new transaction. |
commit | Commit the transaction. |
rollback | Toll the transaction back. |
function qdb()
Prepares statement (1st argument) with prep_stmt and executes it with the remaining arguments.
A PDOStatement object.
Makes using transactions easier.
Functions | |
__construct | Start a new transaction. |
commit | Commit the transaction. |
rollback | Toll the transaction back. |
Establish a connection to the MySQL database.
function db_connect()
Substitutes “PREFIX_” in the input string with the prefix from the config.
function sub_prefix( $q )
Prepares a SQL statement using the global DB connection.
function prep_stmt( $q )
Prepares statement (1st argument) with prep_stmt and executes it with the remaining arguments.
function qdb()
Start a new transaction.
public function __construct()
Commit the transaction.
public function commit()
Toll the transaction back.
public function rollback()