I am doing an insert in an oracle db but it return an error:
invalid number
How can i print the $sql variables? to see if any field is wrong?
Also! is this code correct to make an insert ?
As i have several records i would like to var_dump() each variable to see the value they are returning...
below is my code.
<?php
$query = "INSERT INTO TABLE (SEQ, D, H, K, L, N ) VALUES ('SEQ.NEXTVAL', TO_DATE('$d', 'DD/MM/YY'), TO_DATE('$h', 'HH/MI'), '$k', '$l', TO_NUMBER('$n'),)";
$sql = ociparse($db_conn, $query) or die("ERROR");
ociexecute($sql,OCI_COMMIT_ON_SUCCESS);
/* can this code show something?
$nrows = ocifetchstatement( $sql, $results );
for ( $i = 0; $i < $nrows; $i++ ) {
echo $results["SEQ"][$i];
echo $results["D"][$i];
...
}
*/
OCIFreeStatement($sql);
OCILogoff($db_conn);
?>
Thank“s in advance