Wednesday, January 19, 2011

Oracle and PHP

Today seems to be the day the Oracle DB in Dev would start giving problems. I was running an SQL command from my PHP script, but it was never returning results. The SQL was an update command. I found this very strange as I could run the exact same command in Oracle SQL Developer. After alot of hair pulling I found that Oracle SQL Developer had a 'lock' on the table where I was trying to run the update SQL command. Once I closed // committed the outstanding transaction in SQL Developer my PHP script run fine. The problem I have however identified here is that there does not seem to be any may using the OCI library with PHP to put a time limit on the SQL query (more digging required). So I guess for now I may try putting a limit on the PHP script, but I'm really hoping there's some way to put a time limit on the SQL query to Oracle from PHP.

No comments:

Followers