summaryrefslogtreecommitdiffstats
path: root/testdb.php
diff options
context:
space:
mode:
Diffstat (limited to 'testdb.php')
-rw-r--r--testdb.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/testdb.php b/testdb.php
index 85c78e3..3523fff 100644
--- a/testdb.php
+++ b/testdb.php
@@ -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);
+}
?>