Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id A84AE2E00A4 for ; Mon, 26 Nov 2007 16:24:14 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 25949-02 for ; Mon, 26 Nov 2007 16:24:11 -0400 (AST) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.191]) by postgresql.org (Postfix) with ESMTP id 602672E004A for ; Mon, 26 Nov 2007 16:24:11 -0400 (AST) Received: by mu-out-0910.google.com with SMTP id i10so1115935mue for ; Mon, 26 Nov 2007 12:24:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=n2bm2ltOqP/FGiIiUVOpO6gz5Bk2m3tvoJJFaBzH/oY=; b=G8z6TMB/zLkn6ENl2ht9NNLkkHbh76NdMFxLzvjsUYL+OL0irCyfTexOdQwDx1Jmj8kajaU1G3Gg83WmzO7f5cC5NU9OHq7MxnaqbBpCyZ8zG1yfldkg7gSRkqWzm2h92YgUXvUsY4+ELpQ2BmQwZe4BB4wZveILDuJHB/xUs5I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=j1vzi0mTAd+OHMjXi6yijYmNBAbQqge1rzbWTtdGkpvvB/sdXkWtLYwFTmElcEseiMOAriuBh+zzbnfjEn7DN/PkGVBul9ggCelMGMSeUGxr3N4cv5eK0iTo83q9x4b3F8GZwmDgYANVEMhTX2qZTGrTFXGOYSGwM6WqN8sorq4= Received: by 10.82.123.16 with SMTP id v16mr7630173buc.1196108644390; Mon, 26 Nov 2007 12:24:04 -0800 (PST) Received: by 10.82.159.14 with HTTP; Mon, 26 Nov 2007 12:24:04 -0800 (PST) Message-ID: <85e352e10711261224h71092c7cvfe17df9653874dff@mail.gmail.com> Date: Mon, 26 Nov 2007 15:24:04 -0500 From: "Jonathan Mast" To: pgsql-jdbc@postgresql.org Subject: Queries with 'AND' clauses not returning results MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/79 X-Sequence-Number: 17834 I have some jsp with calls to our pg database, and yes, I know this is not the optimal way to do it, but we can't stop everything to re-engineer our website to use Struts or whatever. That said, the problem is that statements such as: "SELECT * FROM tbl_someTable WHERE email='nobody@nowhere.com' ; work fine while statements like this don't work (no records returned): "SELECT * FROM tbl_someTable WHERE email='nobody@nowhere.com' AND password='abcd'"; And quoting the field 'password' doesn't make a difference. I know such records actually exist because I'm printing out the query on the webpage, copying it to pgAdmin and executing with results. I have no idea why its not working. specs: Apache 1.3.33 Tomcat 5.5.17 postgresql 8.1.3