aboutsummaryrefslogtreecommitdiff
path: root/tests/read.php
blob: 52813353116c489740462587ed06a51fe12e9781 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
/**
 * Cinisis - Isis db reading tool.
 */
?>

<?php
// Import requisites.
require_once '../index.php';
require_once 'includes/header.inc.php';
?>

<table><tr>

<?php

$configs = array(
  0 => array(
    'implementation' => 'PhpIsis',
    'database'       => 'anu10',
    ),
  1 => array(
    'implementation' => 'BiblioIsis',
    'database'       => 'anu10',
    ),
);

foreach ($configs as $config) {
  // Get a db instance.
  $isis = new CinisisDb($config);

  // Test connection.
  if ($isis->db) {
    $result  = $isis->db->read(1);
    $entries = $isis->db->entries();

    // Format output.
    echo '<td>';
    echo '<pre>';
    echo 'Implementation: '. $config['implementation'] ."\n";
    echo "Rows: $entries\n";
    print_r($result);
    echo '</pre>';
    echo '</td>';
  }
}

?>

</tr></td></table>
</body>