diff options
author | Remi Collet <fedora@famillecollet.com> | 2010-10-31 18:02:59 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2010-10-31 18:02:59 +0100 |
commit | efc4cbd224958735e5673507c2acd4efe43ffc65 (patch) | |
tree | 3d178d14c4d77d15dcd245d7f0024adb86609737 /testdb.php | |
parent | 13f5a889da9cd6fcb864ae0b84eb31e4e97a9d10 (diff) |
create TableUpstream class and use it everywhere
Diffstat (limited to 'testdb.php')
-rw-r--r-- | testdb.php | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -66,4 +66,26 @@ if ($row = $rpm->get(888)) { } else { echo "not found\n"; } +$up = new TableUpstream($db); +$up->delete(array('name'=>'foo','type'=>'test')); +$rec = $up->record('test','bar','foo','1.0',true); +echo "record(foo-1.0) : $rec\n"; +echo "find(foo,test):"; +if ($row = $up->find(array('name'=>'foo','type'=>'test'))) { + print_r($row); +} else { + echo "not found\n"; +} +$up->record('test','bar','foo','1.2',false,'beta'); +echo "record(foo-1.2) : $rec\n"; +echo "find(foo,test):"; +if ($row = $up->find(array('name'=>'foo','type'=>'test'))) { + print_r($row); +} else { + echo "not found\n"; +} +echo "request(test) : "; +foreach($up->request(array('type'=>'test', 'ORDER'=>'name')) as $upstr) { + print_r($upstr); +} ?> |