Removes current record.
bool i5_delete_record (resource file)
Parameters
File |
Opened 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_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
/* Connection and file opening */
$conn = i5_connect("MY_AS","USER","PASSWORD");
$file = i5_open("EASYCOM/TESTFILE", I5_OPEN_READWRITE);
i5_new_record($file, array('C-105', 'DUPOND', 'Jean', 'Avenue du Quebec', 'Les Ulis', 3, 'FR'));
$rec = i5_fetch_row($file, I5_READFIRST);
i5_update_record($file, array("CODE" => "C-02", "NOM" => "DUPONT", "TYPE" => 3));
/* Deletes record */
$ret = i5_delete_record($file);