1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-24 06:33:13 +02:00

updated conditional SQL

This commit is contained in:
David Grudl
2006-06-07 21:33:46 +00:00
parent a3a17f1c55
commit 0e7f85c73a
5 changed files with 120 additions and 93 deletions

32
examples/logger.php Normal file
View File

@@ -0,0 +1,32 @@
<pre>
<?php
require_once '../dibi/dibi.php';
// enable log 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);
?>