mirror of
https://github.com/dg/dibi.git
synced 2025-08-23 06:02:54 +02:00
update to 0.5alpha
This commit is contained in:
31
examples/logging.php
Normal file
31
examples/logging.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<pre>
|
||||
<?php
|
||||
|
||||
require_once '../dibi/dibi.php';
|
||||
|
||||
|
||||
dibi::$logfile = 'log.sql';
|
||||
|
||||
|
||||
// mysql
|
||||
dibi::connect(array(
|
||||
'driver' => 'mysql',
|
||||
'host' => 'localhost',
|
||||
'username' => 'root',
|
||||
'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);
|
||||
|
||||
|
||||
?>
|
Reference in New Issue
Block a user