PHP Velho Oeste 2024

sqlite_seek

(PHP 5 < 5.4.0, PECL sqlite >= 1.0.0)

sqlite_seekMove o ponteiro interno para uma linha em um conjunto de resultados

Descrição

sqlite_seek ( resource $result , int $rownum ) : bool

sqlite_seek() move o ponteiro interno para a linha idicada pelo parâmetro rownum. O numero da linha é baseado em zero (0 é a primeira linha). Retorna FALSE se a linha não existir, TRUE em outro caso.

Nota:

Esta função não pode ser usada com query sem buffer.

Veja também sqlite_next(), sqlite_current() e sqlite_rewind().

add a note add a note

User Contributed Notes 1 note

up
0
mina86 at tlen dot pl
19 years ago
I've encoutered strange problem when using sqlite_seek(). When I tried to move the pointer to the first row (#0) I got the fallowing error message: row 0 out of range. The workaround seems to be use of sqlite_rewind(). One can use the fallowing function instead of the original one:

<?php
function sqlite_data_seek($result, $numrow) {
  if (
$numrow==0) {
    return
sql_rewind($result);
  } else {
    return
sql_seek($result, $numrow);
  }
}
?>
To Top