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

19 lines
369 B
PHP
Raw Normal View History

2010-08-03 12:28:07 +02:00
<!DOCTYPE html><link rel="stylesheet" href="data/style.css">
2008-07-17 03:51:29 +00:00
<h1>dibi import SQL dump example</h1>
2010-08-03 12:28:07 +02:00
2008-07-17 03:51:29 +00:00
<?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' => 'data/sample.sdb',
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
echo 'Number of SQL commands:', $count;