1
0
mirror of https://github.com/dg/dibi.git synced 2025-01-17 14:18:25 +01:00
php-dibi/examples/load-sql-dump.php

17 lines
302 B
PHP
Raw Normal View History

2008-07-17 03:51:29 +00:00
<h1>dibi import SQL dump example</h1>
<pre>
<?php
require_once 'Nette/Debug.php';
2008-07-17 03:51:29 +00:00
require_once '../dibi/dibi.php';
dibi::connect(array(
'driver' => 'sqlite',
'database' => 'sample.sdb',
));
2008-10-28 02:06:55 +00:00
$count = dibi::loadFile('compress.zlib://sample.dump.sql.gz');
2008-07-17 03:51:29 +00:00
echo 'Number of SQL commands:', $count;