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

search for in the

SwishSearch->execute> <SwishResults->nextResult
Last updated: Fri, 13 Nov 2009

view this page in

SwishResults->seekResult

(PECL swish >= 0.1.0)

SwishResults->seekResult現在のシークポインタを指定した位置に設定する

説明

int SwishResults->seekResult ( int $position )
警告

この関数は、 実験的 なものです。この関数の動作・ 名前・その他ドキュメントに書かれている事項は、予告なく、将来的な PHP のリリースにおいて変更される可能性があります。 この関数は自己責任で使用してください。

パラメータ

position

ゼロから始まる位置番号。ゼロより小さくすることはできません。

返り値

成功した場合に新しい位置を返します。

エラー / 例外

エラー時に SwishException をスローします。

例1 基本的な SwishResults->seekResult() の例

<?php

try {

    
$swish = new Swish("index.swish-e");
    
$search $swish->prepare();

    
$results $search->execute("lost");

    
var_dump($results->seekResult(0)); // これは成功します
    
var_dump($results->seekResult(100)); // これは失敗します

} catch (SwishException $e) {
    echo 
"Error: "$e->getMessage(), "\n";
}

?>

上の例の出力は、 たとえば以下のようになります。

int(0)
Error: No more results



add a note add a note User Contributed Notes
SwishResults->seekResult
There are no user contributed notes for this page.

SwishSearch->execute> <SwishResults->nextResult
Last updated: Fri, 13 Nov 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites