I'm writing a php code to upload a csv file into an Oracle DB by mean of php oci. I want an atomic insertion of all the rows of the file i.e if one row has missing/wrong field then whole csv file must not be inserted in DB.
I know I can achieve this using INSERT ALL
statement, but I can't make it work with parameter binding.
E.g. oci_bind_by_name only works with INSERT
of a single line, it doesn't work for me with INSERT ALL
or INSERT
of multiple rows.
Do you have an alternative solution or a working code snippet?
Many many thanks