Remove current record.
bool i5_ delete (resource file)
Parameters
file |
IBM i file resource |
Return
True if OK, false if failed.
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 |
Details
The file must be opened in writing, set on a record, being in editing mode with i5_edit.
Example
/* Connection and file opening */
$conn = i5_connect("MY_AS","USER","PASSWORD");
$res = i5_open("EASYCOM/TESTFILE", I5_OPEN_READWRITE);
/* Activates current record edition mode */
$ret = i5_edit($res, I5_EDIT_ONE);
/* Deletes record */
$ret = i5_delete($ret);
See also