downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

sqlite_single_query> <sqlite_rewind
Last updated: Fri, 06 Nov 2009

view this page in

sqlite_seek

SQLiteResult->seek

(PHP 5, PECL sqlite >= 1.0.0)

sqlite_seek -- SQLiteResult->seek特定のレコード番号へシークする

説明

bool sqlite_seek ( resource $result , int $rownum )

オブジェクト指向言語型スタイル (メソッド):

SQLiteResult
bool seek ( int $rownum )

sqlite_seek()は、パラメータ rownum で指定したレコードにシークします。

パラメータ

result

SQLite 結果リソース。 このパラメータは、 オブジェクト指向言語型メソッドを使用する場合は不要です。

注意: この関数は、 バッファなしの結果ハンドルで使用することはできません。

rownum

シークするオリジナルのレコード番号。 レコード番号は 0 から始まります (0 が先頭レコード) 。

注意: この関数は、 バッファなしの結果ハンドルで使用することはできません。

返り値

レコードが存在しない場合は FALSE、それ以外の場合に TRUE を返します。

参考



add a note add a note User Contributed Notes
sqlite_seek
mina86 at tlen dot pl
12-May-2004 05:17
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);
  }
}
?>

sqlite_single_query> <sqlite_rewind
Last updated: Fri, 06 Nov 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites