Received: from bush.rutgersinsurance.com (rutgersinsurance.com [38.138.71.194]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f6QFsCf89119 for ; Thu, 26 Jul 2001 11:54:12 -0400 (EDT) (envelope-from aalang@rutgersinsurance.com) Received: from nj012 ([10.10.10.51]) by bush.rutgersinsurance.com (8.9.3/8.9.3) with SMTP id MAA28212 for ; Thu, 26 Jul 2001 12:15:25 -0400 Message-ID: <00eb01c115eb$83e1dd80$330a0a0a@rutgersinsurance.com> From: "Adam Lang" To: References: <3B5779FE.74C87025@catalyst.net.nz> <00a701c115e5$c0c4c6a0$9d0c10ac@1211.nypost.com> Subject: Re: how to determine where a select statement fails Date: Thu, 26 Jul 2001 11:56:21 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archive-Number: 200107/25 X-Sequence-Number: 482 I really don't think that is SQL's job. I think you have to code conditions like that yourself. Adam Lang Systems Engineer Rutgers Casualty Insurance Company http://www.rutgersinsurance.com ----- Original Message ----- From: "Heather Johnson" To: Sent: Thursday, July 26, 2001 11:15 AM Subject: [PHP] how to determine where a select statement fails > I am using php to do a select query which returns rows on the condition that > a conjunction is true in the WHERE clause. This is the SELECT statement: > > SELECT low_range, high_range, st_name, city, zip FROM router > WHERE st_name = '$st_name' AND city = '$city' AND zip = '$zip'; > > In the event that the query fails to return any rows, I'd like to be able to > determine which conjunct caused it to fail. So, for example, if the > user-entered $st_name isn't in the router table, I'd like to know that > st_name = '$st_name' is what made the conjunction false and caused the query > to fail. $pg_errormsg isn't this specific about query failures though. Does > anyone know how I might be able to get this information? > > Thanks! > Heather Johnson > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly