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
|
|
|
|
|
2013-06-23 01:57:48 +02:00
|
|
|
require dirname(__FILE__) . '/Nette/Debugger.php';
|
|
|
|
require dirname(__FILE__) . '/../dibi/dibi.php';
|
2008-07-17 03:51:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
dibi::connect(array(
|
|
|
|
'driver' => 'sqlite',
|
2010-08-03 12:11:14 +02:00
|
|
|
'database' => 'data/sample.sdb',
|
2008-07-17 03:51:29 +00:00
|
|
|
));
|
|
|
|
|
|
|
|
|
2010-08-03 12:11:14 +02: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;
|