Results 1 to 1 of 1
  1. #1
    Join Date
    Jul 2004

    Unanswered: Retrieving limited num of Data from ORacle DB

    Hi everybody,

    I have a havey table that contains about 45,000 records. So I need to display 10 records by 10. but I don't know how Am using php to display them, but i think there could be a way to limit the number of fetchd records using sql statment.. Because when i tried to figure it out using php functions (OCI collection) i found plenty number of fuctions could help, but all of them are for PHP5 and i'm using php4.3 .. and when I use the session to store the content of retrieved records, it doesn't work !!

    here's the code I used for the session (btw, it's my first time using session):

    PHP Code:
    . . .

    $stm ociparse($conn"select SNAME from ss");
    $conn "--selecting<br>";
    $num 0;
    while  ( 
        if (
    $num <= 10)
    $conn " [" ociresult($stm"SNAME") . "]<br>";
    $num $num 1;
    else {
    $_SESSION['d'] = array_unique($stm);
        break; }


    . . .
    "<a href=\"file2.php\">click here</a>"
    file2.php :
    PHP Code:

    echo $_SESSION['d'];
    /* $named = $_SESSION['d'];  
        foreach($named as  $data)
          echo $data . " <br>";

         echo $named;

    The second file prints 0 ! and sometimes it prints NOTHING !!

    Any help will be highly appreciated,
    Last edited by da!sy; 01-01-05 at 07:14.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts