示例#1
0
    echo '<br>';
    echo $db->error;
    echo '<hr>';
    // get a column
    $query = "select {$tableKey} from {$table} where {$tableKey}<10";
    $db->query($query);
    echo 'getColumn(): ' . $query;
    echo '<br>';
    echo DBHelper::dumpColumn($db->getColumn(), true);
    echo '<br>';
    echo $db->error;
    echo '<hr>';
    // show widget
    echo 'new PageWidget() :';
    echo '<br>';
    $p = new PageWidget($db, $limitFunction, $table, $pageLimit);
    echo '<br>';
    echo $p->getPageDropDown();
    echo DBHelper::dumpAll($p->get());
    $prev = $p->getPrevLink();
    $next = $p->getNextLink();
    echo ($prev ? $prev : 'Previous') . ' - ' . ($next ? $next : 'Next');
    echo '<p>';
    echo $p->getIndex();
    echo '<hr>';
    $db->free();
    $db->disconnect();
} else {
    echo $db->error;
}
/////////////////////////////////////////////////////////////