Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Php/Mysql paginate results without resubmitting query

2 views
Skip to first unread message

cb

unread,
Nov 19, 2020, 5:29:53 AM11/19/20
to
Please be patients !
I'm doing a big (sort of) select:
SELECT column1,column2 FROM table ORDER BY column1 LIMIT $count OFFSET
$offset;
(Without the LIMIT the select fails for exceeding time limit or whatelse.)
The user is then allowed to "page down" for getting next $count rows.
It works, BUT the query is re-submitted scanning again the whole DB.
:-(
Is there a way to store the RESULTS of the original query, and then
"paginate" into it (into the stored results) not into the DB?

Googling around I've found (and I'm doing it!)
$rc = mysqli_query($db, $qlib);
while ($row = mysqli_fetch_array($rc)) {
array_push($righe, $row);
}
BUT if $qlib has no LIMIT it abend for exceeding limits.

THANK YOU !

cb

unread,
Nov 19, 2020, 11:52:29 AM11/19/20
to
On 11/19/20 11:29 AM, cb wrote:
> Please be patients !
> I'm doing a big (sort of) select:
> ecc. ecc.
Come disse il poeta
sorbole ho sbagliato newsgroup :-(
0 new messages