Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 12DF8475AE4 for ; Wed, 22 Jan 2003 22:40:16 -0500 (EST) Received: from goatelecom.com (unknown [61.1.72.28]) by postgresql.org (Postfix) with ESMTP id 322C3475ADE for ; Wed, 22 Jan 2003 22:40:14 -0500 (EST) Received: from sharmad.sanico.org (dialup-74-229.goatelecom.com [61.1.74.229]) by goatelecom.com (8.11.0/8.11.0) with SMTP id h0N3rt201326; Thu, 23 Jan 2003 09:23:56 +0530 (IST) Date: Fri, 24 Jan 2003 22:38:34 +0530 From: Sharmad Naik To: ryanne cruz Cc: pgsql-php@postgresql.org Subject: Re: pg_result Message-Id: <20030124223834.377cd8fb.sharmad@goatelecom.com> In-Reply-To: <1043216312.3e2e37b8b1d11@mail.up.edu.ph> References: <1043216312.3e2e37b8b1d11@mail.up.edu.ph> Organization: Padre Conceicao College Of Engg X-Mailer: Sylpheed version 0.8.2 (GTK+ 1.2.10; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/59 X-Sequence-Number: 1804 Hi, PLease look at the query.The syntax is "SELECT attribute_name[,attr2,..] FROM tables WHERE attribute =[LIKE,IN,..] ETC.. It looks in ur query that province is an attribute as well as a query. Reagrds Sharmad On Wed, 22 Jan 2003 14:18:32 +0800 ryanne cruz wrote: > > 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! > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)