1
0
mirror of https://github.com/dg/dibi.git synced 2025-02-23 10:26:21 +01:00
php-dibi/examples/importing-dump-from-file.php
2015-10-09 12:20:08 +02:00

19 lines
347 B
PHP

<!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;