I wanted to do
$qid=sybase_query("
begin transaction
delete from thetable where someid=1
insert into thetable (someid,nextid,val) values(1,12,'aa')
insert into thetable (someid,nextid,val) values (1,14,'bb')
commit transaction
As in : make sure deletion and insert happens in one transaction to keep the database in order.
This doesn't work as I hoped. The deletions and insertions get done, but after the transaction the persistant connection to sybase is in some weird state and I can't use it until I restart my httpd (which breaks all persistant connections and reopens them when needed).
So I guess I need to do something special to make transactions (compound statements?) work.
Any hints ? experiences ?
$qid=sybase_query("
begin transaction
delete from thetable where someid=1
insert into thetable (someid,nextid,val) values(1,12,'aa')
insert into thetable (someid,nextid,val) values (1,14,'bb')
commit transaction
As in : make sure deletion and insert happens in one transaction to keep the database in order.
This doesn't work as I hoped. The deletions and insertions get done, but after the transaction the persistant connection to sybase is in some weird state and I can't use it until I restart my httpd (which breaks all persistant connections and reopens them when needed).
So I guess I need to do something special to make transactions (compound statements?) work.
Any hints ? experiences ?