i5_update

 

Commits changes done to the file record after i5_edit() or i5_addnew() into the file.

 

Bool i5_update

( resource file )

 

Details

 

i5_update function validates added record updating (i5_addnew) or curently edited (i5_edit) witch values were modified (at prior) with i5_setvalue.

 

Parameters

 

file

I5 file resource

 

Returns:

True if OK, false if failed.

 

I5_ERR_PHP_HDLDFT

256

No default connection found.

I5_ERR_PHP_OPTIONSTYPE

259

The type of " I5_OPTIONS_ALIAS" option must be x and not x

I5_ERR_PHP_OPTIONSNUMBER

260

Option number -1 is unknown.

I5_ERR_PHP_TYPEPARAM

262

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

 

 

Example

 

 

 

/* File opening */

$fich = i5_open("EASYCOM/SP_CUST" , I5_OPEN_READWRITE);

 

 

/* Current record edition */

$ret = i5_edit($fich);

 

 

/* Current record field modification */

$ret = i5_setvalue($fich, "SP_CUST", "C-02") ;

 

 

/* Modification validation */

$ret = i5_update($fich);

 

 

See also

 

i5_open

i5_edit

i5_delete

i5_addnew

i5_cancel_edit