From: Elijah O. Alcantara <elijah@asti.dost.gov.ph>
To: pgsql-php@postgresql.org
Subject: Bad date external representation
Date: Mon, 05 Jul 2004 16:06:28 +0800
Message-ID: <1089014787.23599.31.camel@Falcon> (raw)
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: elijah@asti.dost.gov.ph
Subject: Re: Bad date external representation
In-Reply-To: <1089014787.23599.31.camel@Falcon>
References: <1089014787.23599.31.camel@Falcon>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox