Scusa ma io credevo che conoscessi bene oracle...mmm allora le cose si complicano se devi farlo da sola...

Quello che ti consiglio io è di usare innanzi tutto un framework tipo Codeigniter per lo sviluppo, questo infatti ha delle
librerie per il collegamento a molteplici database tra i quali oracle..

Questo è un link che ti spiega come configurarlo.
http://web.archive.org/web/200804211...d-codeigniter/

Codeigniter ha una semplice libreria che ti permette di gestire le impaginazioni in modo da metterti da solo
pagina 1 - 2 - 3 ecc.

Diversamente se vuoi fare da sola prova una cosa del genere ovviamente modificandola in base alle tue esigenze:

codice:
<html>
    <head>
        <title>PAGING</title>
    </head>
    <body>
        <?
        session_start();
        $session_check = $orcl->oracle_select("SESSION_ID", "*");
        $Per_Page = 10; // Per Page
        $Num_Rows = $orcl->numberrows;
        if (!isset($_GET["Page"])) {
            $Page = 1;
        } else {
            $Page = $_GET["Page"];
        }
        $Prev_Page = $Page - 1;
        $Next_Page = $Page + 1;
        $Page_Start = ( ( $Per_Page * $Page ) - $Per_Page );
        if ($Num_Rows <= $Per_Page) {
            $Num_Pages = 1;
        } else if (( $Num_Rows % $Per_Page ) == 0) {
            $Num_Pages = ( $Num_Rows / $Per_Page );
        } else {
            $Num_Pages = ( $Num_Rows / $Per_Page ) + 1;
            $Num_Pages = (int) $Num_Pages;
        }
        $Page_End = $Per_Page * $Page;
        if ($Page_End > $Num_Rows) {
            $Page_End = $Num_Rows;
        }
        ?>
        <table width="800" border="1" cellpadding="0" cellspacing="0" style="">
            <tr>
                <th width="400" align="center">CUSTOMER</th>
                <th width="400" align="center">Name</th>
            </tr>
        <?
        for ($i = $Page_Start; $i < $Page_End; $i++) {
            ?>
                <tr>
                    <td width="400" align="center">
                        <?= $session_check["ID"][$i]; ?>
                    </td>
                    <td width="400" align="center"><?= $session_check["USER_ID"][$i]; ?></td>
                </tr>
                <?
            }
            ?>
        </table>
        <table width="800" border="0" cellpadding="0" cellspacing="0" style="">
            <tr>
                <td align="center"> </td>
            </tr>
            <tr>
                <td align="center">Total <?= $Num_Rows; ?> Record : <?= $Num_Pages; ?> Page :</td>
            </tr>
            <tr>
                <td align="center">
                    <?
                    if ($Prev_Page) {
                        echo " << Back ";
                    }

                    for ($i = 1; $i <= $Num_Pages; $i++) {
                        if ($i != $Page) {
                            echo "[ $i ]";
                        } else {
                            echo " $i ";
                        }
                    }
                    if ($Page != $Num_Pages) {
                        echo " <a href ='$_SERVER[SCRIPT_NAME]?Page=$Next_Page'>Next>></a> ";
                    }
                    ?>
                </td>
            </tr>
            <tr>
                <td align="center"> </td>
            </tr>
        </table>
    </body>
</html>