Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 1A56C476D0D for ; Wed, 22 Jan 2003 01:06:08 -0500 (EST) Received: from mail02.up.edu.ph (unknown [210.14.43.1]) by postgresql.org (Postfix) with SMTP id 8B889476DA4 for ; Wed, 22 Jan 2003 01:04:42 -0500 (EST) Received: (qmail 27487 invoked by uid 504); 22 Jan 2003 06:36:41 -0000 Received: from ryanne.cruz@up.edu.ph by web2 with qmail-scanner-1.01 (update: v4243 15 Jan 2003. Clean. Processed in 0.949767 secs); 22 Jan 2003 06:36:41 -0000 Received: from unknown (HELO b01.mail.up.edu.ph) (10.16.3.1) by 10.16.3.144 with SMTP; 22 Jan 2003 06:36:39 -0000 Received: (qmail 19243 invoked by uid 504); 22 Jan 2003 06:08:15 -0000 Received: from ryanne.cruz@up.edu.ph by b01 with qmail-scanner-1.01 (update: v4243 15 Jan 2003. Clean. Processed in 0.431457 secs); 22 Jan 2003 06:08:15 -0000 Received: from unknown (HELO localhost) ([10.16.3.5]) (envelope-sender ) by 10.16.3.1 (qmail-ldap-1.03) with SMTP for ; 22 Jan 2003 06:08:15 -0000 Received: from 10.33.187.83 ( [10.33.187.83]) as user rocruz1@b04.mail.up.edu.ph by mail.up.edu.ph with HTTP; Wed, 22 Jan 2003 14:18:32 +0800 Message-ID: <1043216312.3e2e37b8b1d11@mail.up.edu.ph> Date: Wed, 22 Jan 2003 14:18:32 +0800 From: ryanne cruz To: pgsql-php@postgresql.org Subject: pg_result MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.1 X-Originating-IP: 10.33.187.83 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/34 X-Sequence-Number: 1779 hi list. this is my script: $query7="select provinceid from province where province like '$tablename1';"; $result7=pg_exec($conn,$query7); if(!$result7){ . . .} else { . . . } my problem is when the value of the variable $tablename1 is not on the table province, it doesn't go to the if statements. what am i doing wrong? thanks!