Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:4941 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93827 invoked by uid 1010); 23 Oct 2003 13:24:01 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 93802 invoked from network); 23 Oct 2003 13:24:01 -0000 Received: from unknown (HELO mail4.edisontel.com) (62.94.0.37) by pb1.pair.com with SMTP; 23 Oct 2003 13:24:01 -0000 Received: from ip085-3-3.dialup.edisontel.com (62.94.130.86) by mail4.edisontel.com (7.0.020) id 3F434731001C52BF for internals@lists.php.net; Thu, 23 Oct 2003 15:24:01 +0200 To: PHP Internals Date: Thu, 23 Oct 2003 15:27:15 +0200 User-Agent: KMail/1.5.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-ID: <200310231527.15424.cesare@ngi.it> Subject: Re: [PHP-DEV] database driver: no more rows From: cesare@ngi.it (Cesare D'Amico) Alle 15:02, gioved=EC 23 ottobre 2003, Lukas Smith ha scritto: > > . run query 1 > > . check if q1 worked > > . run query 2 > > . check if q2 worked > > . if q1 worked -> fetch data > > > > ...and so on. > > > > Perhaps I'm missing something, but I can't see a real issue here. > > Yeah, you are missing something :-/ [...] > The other alternative would be to remember the last error and check > if that error is the same every time you check and all such solutions > are possible but very hacky of course. Well, I didn't miss anything :) What you call hacky is the way I usually work: do something, check if=20 there was an error; if so, collect the error, else (or then) go on. I don't want to be polemical, only I can't see anything wrong (if you=20 need the mysql_error()) in doing something like: =2E run query 1 =2E check if q1 worked =2E if not -> q1_error =3D mysql_error() =2E run query 2 =2E check if q2 worked =2E if not -> q2_error =3D mysql_error() =2E if q1 worked -> fetch data It's obvious that I am no-one in the php decisional process ;) I think that your proposal would be more elegant than the way things are=20 now; it would be also better, if it didn't break bc with ways of=20 programming that are commonly in use. Again: no polemical spirit :) Ciao ce =2D-=20 Cesare D'Amico - http://www.phpday.it "E` un'emergenza!!! Dovrei fare questo-e-questaltro ma non=20 posso perche' la mia testa e` piena di segatura e criceti!!!" -- un utente [ http://www.soft-land.org/storie/ ]