How does one reuse a query result with PHP ADODB, at the moment I am doing this, which I assume is inefficient? :
$query = "SELECT colname FROM table";
$result1 = $db->SelectLimit($query,10,-1);
$result2 = $db->SelectLimit($query,10,-1);
// 1ST RUN
while (!$result1->EOF) {
echo $result1->Fields('colname').'<br>';
$result1->MoveNext();
}
// 2ND RUN
while (!$result2->EOF) {
echo $result2->Fields('colname').'<br>';
$result2->MoveNext();
}
To answer my own question, need to use:
so like this: