RT, google said that the SQL statement is too long and can be used to bind variables. The project uses yii, so. I use bindParam of yii to solve the error of too long characters, but the new error comes: only the LONG value of the LONG column to be inserted can be bound .. Struggling, asking for help .. RT, google said that the SQL statement is too long and can be used to bind variables. The project uses yii, so. I use bindParam of yii to solve the error of too long characters, but the new error comes: only the LONG value of the LONG column to be inserted can be bound ..
Struggling, asking for help ..
The problem has been disabled. cause:
Reply content:
RT, google said that the SQL statement is too long and can be used to bind variables. The project uses yii, so. I use bindParam of yii to solve the error of too long characters, but the new error comes: only the LONG value of the LONG column to be inserted can be bound ..
Struggling, asking for help ..
Dig graves .. After so long, I accidentally found a solution .. The original Oracle official documentation has a method .. Khan...
Use php_oci8 extension.
During insertion:
$sql = "INSERT INTO mylobs (id,mylob) VALUES (mylobs_id_seq.NEXTVAL,EMPTY_CLOB()) RETURNING mylob INTO :mylob_loc";$stmt = oci_parse($conn, $sql);$myLOB = oci_new_descriptor($conn, OCI_D_LOB);oci_bind_by_name($stmt, ":mylob_loc", $myLOB, -1, OCI_B_CLOB);oci_execute($stmt, OCI_DEFAULT) or die ("Unable to execute query\n");$myLOB->save('mylob_loc');oci_commit($conn);oci_free_statement($stmt);$myLOB->free();oci_close($conn);
Http://www.oracle.com/technetwork/art...