TwistPHP Documentation

Database

File path: dist/twist/Core/Utilities/Database.utility.php
Namespace: Twist\Core\Utilities
Extends: Base

Type: Utility

Database — A utility 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 utility.

Example Usage

<?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 List

Method Access Returns
__constructconstructvoid
__destructpublicvoid
connectpublicvoid
connectedprotectedvoid
isConnectedpublicvoid
closepublicvoid
checkSettingspublicvoid
getServerInfopublicvoid
mbSupportpublicvoid
querypublicvoid
recordspublicvoid
tablepublicvoid
lastQuerypublicvoid
escapeStringpublicvoid
importSQLpublicvoid
exportSQLpublicvoid
autoCommitpublicvoid
autocommitStatuspublicvoid
commitpublicvoid
rollbackpublicvoid
uncommittedQueriespublicvoid
debugModepublicvoid
debugprivatevoid