i5_bookmark

 

Returns the ID of the current record.

 

int i5_bookmark (

resource result/file )

 

Details

 

A bookmark is an ID (in fact the record number) allowing to mark the current record in order to be able to comeback to it later using i5_data_seek function.

 

Parameters

 

file

I5 file resource

 

Returns:

The ID of the current record that can be used with i5_data_seek() to position on this record again.

 

I5_ERR_PHP_HDLBAD

258

Bad connection handle

I5_ERR_PHP_RESOURCE_BAD

261

No resource found .

I5_ERR_PHP_TYPEPARAM

262

Type of element x in parameter -1 must be y. Type z was provided.

I5_ERR_PHP_NBPARAM_BAD

263

Wrong parameter count

 

 

Example

 

 

$file = i5_open('EASYCOM/NCLIENT');

 

/* Looking for MARTIN */

$seek = array("MARTIN");

/* Looking for martin pierre*/

//$seek = array("MARTIN ", "PIERRE");

$ret = i5_seek($file, "=", $seek);

$rec = i5_fetch_row($file, I5_READ_SEEK);

 

/* Set a bookmark on current record */

$dupont = i5_bookmark($file);

 

[... others treatments on the file ...]

 

/* Direct return to back to DUPONT record */

$ret = i5_data_seek($file, $dupont);

$rec = i5_fetch_row($file, I5_READ_SEEK);

print_r($rec);echo "<BR>";

 

 

See also

 

i5_data_seek

i5_seek