Why wouldn't an otherwise bug-less SQL statement execute on oci_excute()?
-
I've some PHP code writing to an Oracle database via OCI8 library. I have a insert statement which wouldn't execute programmatically- if I print out the statement and run it via SquirrelSQL it would insert the data successfully. I have delete and select statement elsewhere in the code via $conn which work perfectly. What can be the issue? And as I said if I print $om_query and run manually it inserts successfully. I'm not getting any other errors. $om_query = "INSERT INTO DB.TABLE(R1,R2) VALUES(V1,V2)"; $s2 = oci_parse($conn, $om_query); $qs = oci_execute($s2); oci_commit($conn); if(!$qs){ $ma = oci_error(); $failedqueries .= '<br /><br />MAINQ: ' . $om_query . '<br /><b>OCI_ERROR_MSG: </b>' . $ma['message']; } oci_error() doesn't append anything useful. Same question asked on StackOverflow: http://stackoverflow.com/questions/11271762/why-wouldnt-a-perfect-sql-statement-execute-on-oci-excute
-
Answer:
Check if there are any date(or similar specially formatted) fields. Try running the query without them. Some formats are supported by external clients but not OCI8 execute functions.
Anonymous at Quora Visit the source
Related Q & A:
- Why Isn't Montgomery Modular Exponentiation Considered For Use In Quantum Factoring?Best solution by cstheory.stackexchange.com
- Why won't my app run in the IOS simulator?Best solution by Stack Overflow
- How to write SQL statement with dynamic where clause?Best solution by Stack Overflow
- Why are some Y!A categories less popular than others?Best solution by answers.yahoo.com
- Why can't my computer can't detect my external hard drive?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.