File path: dist/twist/Core/Helpers/Database.helper.php
Namespace: Twist\Core\Helpers
Extends: Base
Type: Class
Database
— A helper to simplify database connections for your PHP projects. Allowing connections to be made using MySQL, MySQLi and PDO.
Connections to multiple database servers can be created and used side by site with this unique instancable helper.
<?php
//Set the variables for the example
$strHost = null;
$strUsername = null;
$strPassword = null;
$strDatabaseName = null;
$strProtocol = null;
//Call the function connect with the example vars
Twist::Database() -> connect($strHost, $strUsername, $strPassword, $strDatabaseName, $strProtocol);
Method | Access | Returns |
---|---|---|
__construct | construct | void |
__destruct | public | void |
connect | public | void |
connected | protected | void |
isConnected | public | void |
close | public | void |
checkSettings | public | void |
getServerInfo | public | void |
mbSupport | public | void |
setDatabase | public | void |
query | public | void |
records | public | void |
table | public | void |
lastQuery | public | void |
escapeString | public | void |
importSQL | public | void |
exportSQL | public | void |
autoCommit | public | void |
autocommitStatus | public | void |
commit | public | void |
rollback | public | void |
uncommittedQueries | public | void |
debugMode | public | void |
debug | private | void |