1
0
mirror of https://github.com/dg/dibi.git synced 2025-02-22 18:02:25 +01:00
php-dibi/examples/logger.php

32 lines
603 B
PHP
Raw Normal View History

2006-06-04 23:06:33 +00:00
<pre>
<?php
require_once '../dibi/dibi.php';
2006-06-07 21:33:46 +00:00
// enable log to this file
2006-07-19 01:40:29 +00:00
dibi::$logFile = 'log.sql';
2006-06-04 23:06:33 +00:00
// mysql
dibi::connect(array(
'driver' => 'mysql',
'host' => 'localhost',
'username' => 'root',
2006-06-07 15:50:32 +00:00
'password' => 'xxx', // change to real password!
2006-06-04 23:06:33 +00:00
'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);
?>