TwistPHP Documentation

connect

File path: dist/twist/Core/Helpers/Database.helper.php
Namespace: Twist\Core\Helpers
Extends: Base

connectMake the main connection to the database, automatically called if a custom connection is not required

Parameters

Name Type Description
[$strHost = null]stringn/a
[$strUsername = null]stringn/a
[$strPassword = null]stringn/a
[$strDatabaseName = null]stringn/a
[$strProtocol = null]stringn/a

Return Values

void — No return information has been documented for this function.

Example

<?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);