1
0
mirror of https://github.com/dg/dibi.git synced 2025-02-22 01:48:05 +01:00
php-dibi/examples/importing-dump-from-file.php

19 lines
347 B
PHP
Raw Normal View History

2010-08-03 12:28:07 +02:00
<!DOCTYPE html><link rel="stylesheet" href="data/style.css">
2010-08-03 11:48:51 +02:00
<h1>Importing SQL Dump from File | dibi</h1>
2010-08-03 12:28:07 +02:00
2008-07-17 03:51:29 +00:00
<?php
2015-01-13 16:27:01 +01:00
require __DIR__ . '/../src/loader.php';
2008-07-17 03:51:29 +00:00
2015-10-06 01:39:01 +02:00
dibi::connect([
2015-06-19 03:11:36 +02:00
'driver' => 'sqlite3',
'database' => 'data/sample.s3db',
2015-10-06 01:39:01 +02:00
]);
2008-07-17 03:51:29 +00:00
$count = dibi::loadFile('compress.zlib://data/sample.dump.sql.gz');
2008-07-17 03:51:29 +00:00
2011-07-01 08:06:36 +02:00
echo 'Number of SQL commands:', $count;