X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id BDB09D1B1DA for ; Mon, 5 Jul 2004 05:06:41 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 53522-08 for ; Mon, 5 Jul 2004 08:06:38 +0000 (GMT) Received: from kimi.asti.dost.gov.ph (kimi.asti.dost.gov.ph [202.90.128.26]) by svr1.postgresql.org (Postfix) with ESMTP id 91507D1B1D5 for ; Mon, 5 Jul 2004 05:06:35 -0300 (ADT) Received: from falcon.asti.dost.gov.ph (unknown [10.10.5.200]) by kimi.asti.dost.gov.ph (Postfix) with ESMTP id 266ED2381B7 for ; Mon, 5 Jul 2004 15:45:21 +0800 (PHT) Subject: Bad date external representation From: "Elijah O. Alcantara" To: pgsql-php@postgresql.org Content-Type: text/plain Message-Id: <1089014787.23599.31.camel@Falcon> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Mon, 05 Jul 2004 16:06:28 +0800 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/1 X-Sequence-Number: 2826 I keep getting this error: > Warning: PostgreSQL query failed: ERROR: Bad date external > representation 'Resource id #27' in > /usr/local/apache/htdocs/asti/govph/functions/func_backup.php on line > 16 Code: > $query = "Select date_created from organizationinfo where ctrl_no = > '$ctrl_no'"; > $date_created = pg_Exec($connectGovPH, $query); > > $query = "Select date_modified from organizationinfo where ctrl_no = > '$ctrl_no'"; > $date_modified = pg_Exec($connectGovPH, $query); > > $query = "Insert into temp_organizationinfo > VALUES('$ctrl_no','$organization_name','$domain_name','$loginID','$loginPassword','$date_created','$date_modified',4)"; > pg_Exec($connectGovPH, $query); Here's the organizationinfo table: > ctrl_no integer not null, > organization_name varchar not null, > domain_name varchar not null, > login_id varchar not null, > login_password varchar not null, > date_created date, > date_modified date, > status int not null, > constraint pk_organizationinfo_ctrl_no primary key(ctrl_no) Date's are usually inputted as "2002-06-04", Can anyone help me find out what causes this error, and how do I fix it?? =( Regards, Elijah A.