pq errors

From: schemy(at)freesurf(dot)fr
To: pgsql-general(at)postgresql(dot)org
Cc: schemy(at)freesurf(dot)fr
Subject: pq errors
Date: 2001-10-26 09:52:01
Message-ID: 20011026095202.3056B9B02@mail.freesurf.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


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(at)freesurf(dot)fr
http://schemy.free.fr
=====================

Browse pgsql-general by date

  From Date Subject
Next Message Roderick A. Anderson 2001-10-26 12:18:28 Re: RESOLVED : Re: sql script questions
Previous Message Paul Green 2001-10-26 09:11:38 Re: Using other database tables in a query