Informix ifx_close

From: Date: Wed, 24 Jul 2002 09:50:46 +0000
Subject: Informix ifx_close
Groups: php.db 
Request: Send a blank email to php-db+get-20744@lists.php.net to get a copy of this message
I have following script: <? $db=ifx_connect("db","uid","pwd"); $result=ifx_query("begin work",$db); $result=ifx_query("insert into m_test1 (i) values('1');", $db); $result=ifx_query("select * from m_test1;", $db); while($row=ifx_fetch_row($result)) { echo($row['i']); } $result=ifx_query("rollback work;", $db); echo("rollback"); $result=ifx_query("select * from m_test1;", $db); while($row=ifx_fetch_row($result)) { echo($row['i']); } ifx_close($db); ?> If i dont execute $result=ifx_query("rollback work;", $db); and just call ifx_close session is not closed and autmatic rollback is not execute (as it must be) but connection to Informix database stays with lock on this row. Usualy you must have rollback or commit; But to avoid problems with bad code or other coding probs after calling ifx_close() session must be rolled back and closed. What is solution for this case? Martins Junkers

« previous php.db (#20744) next »