Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id C4AD7FA6B98 for ; Thu, 22 Mar 2012 03:00:50 -0300 (ADT) Received: from mahout.postgresql.org ([98.129.198.123]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SAb4p-0001ya-Dj for pgsql-bugs@postgresql.org; Thu, 22 Mar 2012 06:00:49 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SAb4c-000627-M5 for pgsql-bugs@postgresql.org; Thu, 22 Mar 2012 06:00:34 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1SAb4c-00036i-Ej for pgsql-bugs@postgresql.org; Thu, 22 Mar 2012 06:00:34 +0000 Date: Thu, 22 Mar 2012 06:00:34 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #6550: Querry failed while using throung php program. To: pgsql-bugs@postgresql.org From: mkkrish@hotmail.com X-Pg-Spam-Score: -1.0 (-) X-Archive-Number: 201203/161 X-Sequence-Number: 32722 The following bug has been logged on the website: Bug reference: 6550 Logged by: M K Krishnan Email address: mkkrish@hotmail.com PostgreSQL version: 9.0.4 Operating system: Windows 7 Description: = 11Variety One Warning: pg_query(): Query failed: ERROR: syntax error at or near "and" LINE 1: select * from variety_dir where crop_cd=3D and variety_c= d=3D1 ^ in C:\Program Files (x86)\PostgreSQL\EnterpriseDB-ApachePhp\apache\www\agrimetnew\variety_upd.p= hp on line 32 Warning: pg_num_rows() expects parameter 1 to be resource, boolean given in C:\Program Files (x86)\PostgreSQL\EnterpriseDB-ApachePhp\apache\www\agrimetnew\variety_upd.p= hp on line 33 No Record Found . Query works from SQL Screen. When uses through php it fails.