1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-07 06:36:44 +02:00

bug fixed

This commit is contained in:
David Grudl
2008-01-15 05:40:08 +00:00
parent 5c045e58dc
commit c41167d49f
12 changed files with 53 additions and 24 deletions

View File

@@ -5,15 +5,17 @@
require_once '../dibi/dibi.php';
copy('sample.sdb', 'sample_tmp.sdb');
dibi::connect(array(
'driver' => 'sqlite',
'database' => 'sample_tmp.sdb',
'database' => 'sample.sdb',
));
dibi::begin();
// autodetection: primary keys are customer_id, order_id, ...
DibiTable::$primaryMask = '%s_id';
// table products
class Products extends DibiTable
@@ -24,8 +26,7 @@ class Products extends DibiTable
}
// autodetection: primary keys are customer_id, order_id, ...
DibiTable::$primaryMask = '%s_id';
@@ -38,7 +39,7 @@ echo "Primary key: $products->primary\n";
// Finds rows by primary key
foreach ($products->find(1, 3) as $row) {
...
print_r($row);
}