From fe3d37364bbc072aedac951d4b2acc724ba7393a Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sat, 7 Aug 2010 18:32:09 +0200 Subject: add Class TableRpmRepo and use it everywhere --- testdb.php | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 testdb.php (limited to 'testdb.php') diff --git a/testdb.php b/testdb.php new file mode 100644 index 0000000..3454245 --- /dev/null +++ b/testdb.php @@ -0,0 +1,38 @@ +getAllRepo()); + +echo "PEAR\n"; + +$pear = new TablePearRepo($db); +print_r($pear->getAllRepo()); + +$pear = new TablePearRepo($db); +print_r($pear->getAllRepo(false)); + +$a=$pear->add(array('alias'=>'test', 'url'=>'testurl')); +echo "Ajout : $a\n"; + +$b=$pear->delete(array('id'=>$a)); +echo "Del : $b\n"; + +echo "RPM:"; +$rpm = new TableRpmRepo($db); + +if ($rpm->update(999, array('stamp'=>1))) +{ + echo "Update 1 ok\n"; +} +print_r($rpm->getAllRepo()); +if ($rpm->update(999, array('stamp'=>2))) +{ + echo "Update 2 ok\n"; +} +$all = $rpm->getAllRepo(); +print_r(array_pop($all)); +?> -- cgit