[phplib] Transaction not aborted crash the DB support From: Víctor R. Ruiz (rvr <email protected>)
Date: 05/12/00

  Hello:

  Yesterday I was coding a transaction under PHPLIB. I insert a row in
  the bill header's table, get its ID and insert then the lines on the
  bill detail's table.

  The problem is on exiting in the middle of the transaction.

--

$q->query("BEGIN TRANSACTION"); $q->query("INSERT A LINE ON BILL_HEADER");

if (any problem has ocurred) { ## I should do an abort of the transaction, but I don't exit; }

while (there is a line to be inserted) { $q->query("INSERT A LOT OF LINES ON BILL_DETAILS"); } $q->query("END TRANSACTION"); --

The DB support seems crashed now. I can't see any page which uses PHPLIB. I must do a httpd restart. This case is done by hand but I asks whether this problem will be reproduced if some goes wrong and PHP casts and error and halts the execution of the code. Any solution it this cases??

Platform: RedHat 6.2, Apache 1.3.12, PHP 3.0.15, PHPLIB 7.2b, PostgreSQL 6.5.3

Thanks,

----------------------------------------- Víctor R. Ruiz rvr <email protected> Subdirección de Comunicaciones Universidad de Las Palmas de Gran Canaria -----------------------------------------

--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-unsubscribe <email protected> For additional commands, e-mail: phplib-help <email protected>