diff options
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); +} ?> |