PHP
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, 26 Dec 2008

view this page in

SwishResults->seekResult

(No version information available, might be only in CVS)

SwishResults->seekResultSet current seek pointer to the given position

Descripción

int SwishResults->seekResult ( int $position )
Warning

Esta función es EXPERIMENTAL. Esto significa que el comportamiento de esta función, el nombre de esta función y en definitiva TODO lo documentado sobre esta función, puede cambiar en una futura version de PHP SIN AVISO. La advertencia queda hecha, y utilizar esta extensión queda bajo su propia responsabilidad.

Lista de parámetros

position

Zero-based position number. Cannot be less than zero.

Valores retornados

Returns new position value on success.

Errors/Exceptions

Throws SwishException on error.

Ejemplos

Example #1 Basic SwishResults->seekResult() example

<?php

try {

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

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

    
var_dump($results->seekResult(0)); //this will succeed
    
var_dump($results->seekResult(100)); //this will fail

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

?>

El resultado del ejemplo seria algo similar a:

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, 26 Dec 2008
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites