Commits changes done to the file record after i5_edit() or i5_addnew() into the file.
bool i5_ update (resource file)
Parameters
file |
IBM i file resource |
Return
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. |
Details
i5_update function validates added record updating (i5_addnew) or currently edited (i5_edit) which values were modified (at prior) with i5_setvalue.
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