-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathregtool_test2.php
executable file
·49 lines (28 loc) · 1.04 KB
/
regtool_test2.php
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
<?php
require_once 'dcpDataGrid.php';
require_once 'PEAR.php';
define("DB_DATAOBJECT_NO_OVERLOAD",true); /* This is needed for some buggy versions of PHP4 */
require_once "HTML/Table.php";
require_once "dcpDatabase/MysqlDataSource.php";
echo "<h1>we're testing</h1>";
$datasource = new MysqlDataSource();
$count = $datasource->count();
echo "There are $count cats in the farm\n\n";
error_reporting(E_ALL);
ini_set('display_errors', 1);
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$datasource->sort('hostname');
echo "Here are the 5 lowest alpha ones: \n";
// dump() accepts the same $offset and $len argument as fetch()
$datasource->dump(0,5);
// //$datasource->dump(0,5);
// $datagrid =& new Structures_DataGrid(10);
// // // Enable streaming and set buffer size to 1,000 records
// $datagrid->enableStreaming(1000);
// $test = $datagrid->bindDataSource($datasource);
// if (PEAR::isError($test)) {
// echo $test->getMessage();
// die('An error occured while fetching the dcpDataObject information.');
// }
// $datagrid->render();
?>