if you got mysql, use the limit clause (see the other postings)
theoretically you could serialize the result array, too, then pass it via a form/querystring ... (mind the length limitations) and have it unserialized by the following script:
a.php:
$result = db_query(......);
$passresult = serialize($result);
...
<input type=hidden value="<?=$passresult ?>">
...
b.php:
$result = unserialize($passresult);
echo $result[5][9];
...
etc.