I got the response below from one of the developers here in the lab.
Also, we have an email address that our team monitors for any
questions regarding PHP, Ruby, and PERL. The address is:
op*****@us.ibm. com
Feel free to direct your questions to that id too.
1.
The ibm_db2 driver supports setting an autocommit property to TRUE or
FALSE when connecting or via a function call (
http://www.php.net/
manual/en/function.db2-autocommit.php) . If autocommit must be set to
false, then the code should be changed to explicity call a commit or
rollback. This is good db programming practice. Regarding locking a
row vs. the whole table, it sounds like a DBA-type of issue, not
specific to the driver.
2.
The driver doesn't return database error codes to the application
unless explicitly asked to or unless there is a crash or a some other
serious system error. There are several functions that can be used to
see messages from the database. Please see the following:
http://www.php.net/manual/en/functio...stmt-error.php http://www.php.net/manual/en/functio...t-errormsg.php
If there is no insert, then there is no last insert ID, unless the
developer is using a sequence and incrementing it manually.
thanks,
On Aug 10, 6:41 am, vasilip <vasi...@gmail. comwrote:
Can anyone help me out with these two issues I seem to be having?
using the db2 driver for PHP (db2_xxxxxx) functions
1. If I forget, or for some reason db2_commit/db2_rollback doesn't get
executed.. my table becomes inaccessible. How do I set it to only lock
the rows affected rather than the whole table???
2. I don't get an error if I try to insert a badly formatted XML file
into a table. I would get such errors using the JDBC driver... but
with php it returns that the prepared statement successfully
executed.. the last inserted ID is available.. but there is no row in
the table. after a lot of trial and error.. I noticed I hadn't closed
one of hte tags in the xml.. after fixing this the row got inserted
properly... I can't get it to give me error messages regarding the xml
field though...
Any help would be appreciated!!
Vasili Papaconstantino u