Hello, I am using Apache 1.3.19, PHP 4.0.6 and postgres 7.1.3 .
I am embedding SQL transactions in PHP code in a "for" ;
=========================================================
for ( $i = 0 ; $i < $nbPlaces ; $i++ ) {
echo "i=$i";
$result = pg_exec( $database,"BEGIN ;
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
CREATE VIEW TICKETCHERCHE as select min(NumTicket) FROM TICKET WHERE
TICKET.NumEvenement = '$numEvenement' AND TICKET.EtatPlace = '1' AND
TICKET.numticket=IDTICKET.numticket AND
IDTICKET.idgroupe=GROUPETICKET.idgroupe AND GroupeTicket.IdBatiment =
'$idBatiment' AND IDTICKET.IdGroupe = '$idGroupe' ;
INSERT INTO DETAILPANIER( numticket, numevenement, numPanier ) VALUES(
TICKETCHERCHE.MIN,'$numEvenement', '$panier' ) ;
UPDATE TICKET SET EtatPlace = '0' WHERE TICKET.NumEvenement =
'$numEvenement' AND TICKET.EtatPlace = '1' AND GROUPETICKET.IdBatiment =
'$idBatiment' AND IDTICKET.IdGroupe = '$idGroupe' AND
NUMTICKET=TICKETCHERCHE.MIN ;
DROP VIEW TICKETCHERCHE ;
COMMIT ;") ;
echo "result=$result<br>";
}
=========================================================================
but sometimes , i have errors :
pq_flush: send() failed: Connection reset by peer
NOTICE: Adding missing FROM-clause entry in subquery for table
"groupeticket"
pq_flush: send() failed: Broken pipe
pq_flush: send() failed: Broken pipe
What are these functions first ?
Why these errors appears sometimes and not all the time ?
Thanks .
=====================
Abbondanza Thierry
schemy@freesurf.fr
http://schemy.free.fr
=====================