1
0
mirror of https://github.com/dg/dibi.git synced 2025-10-19 00:36:17 +02:00
Files
php-dibi/examples/logging.php
2006-06-07 15:50:32 +00:00

32 lines
607 B
PHP

<pre>
<?php
require_once '../dibi/dibi.php';
// enable logging to this file
dibi::$logfile = 'log.sql';
// mysql
dibi::connect(array(
'driver' => 'mysql',
'host' => 'localhost',
'username' => 'root',
'password' => 'xxx', // change to real password!
'database' => 'test',
'charset' => 'utf8',
));
$res = dibi::query('SELECT * FROM [nucleus_item] WHERE [inumber] = %i', 38);
$res = dibi::query('SELECT * FROM [nucleus_item] WHERE [inumber] < %i', 38);
$res = dibi::query('SELECT * FROM [*nucleus_item] WHERE [inumber] < %i', 38);
?>