dibi::loadFile PHP Method

loadFile() public static method

Import SQL dump from file - extreme fast!
public static loadFile ( $file ) : integer
return integer count of sql commands
    public static function loadFile($file)
    {
        return Dibi\Helpers::loadFromFile(self::getConnection(), $file);
    }

Usage Example

<!DOCTYPE html><link rel="stylesheet" href="data/style.css">

<h1>Importing SQL Dump from File | dibi</h1>

<?php 
require __DIR__ . '/../src/loader.php';
dibi::connect(['driver' => 'sqlite3', 'database' => 'data/sample.s3db']);
$count = dibi::loadFile('compress.zlib://data/sample.dump.sql.gz');
echo 'Number of SQL commands:', $count;
All Usage Examples Of dibi::loadFile