TwistPHP Documentation

importSQL

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

importSQLImport the contents of an SQL file '.sql' directly into your database, providing a database name will allow you to deviate from the default if required

Parameters

Name Type Description
$dirSQLFilestringn/a
[$strDatabaseName = null]stringn/a

Return Values

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

Example

<?php
//Set the variables for the example
$dirSQLFile '/home/user/public_html/twist';
$strDatabaseName null;

//Call the function importSQL with the example vars
Twist::Database() -> importSQL($dirSQLFile$strDatabaseName);