blob: 34542450d3e69d2f3b3ee99f3a9f838745c7b2a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
<?php
require "include/main.php";
require "class/CommonTable.php";
$db = new PDO ("mysql:dbname=" . MYBASE . ";host=" . MYHOST, MYUSER, MYPASS);
$pear = new TableRRepo($db);
print_r($pear->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));
?>
|