pg.ddx.io pgsql-php@postgresql.org mailing list archive
help / color / mirror / Atom feedBad date external representation
3+ messages / 2 participants
[nested] [flat]
* Bad date external representation
@ 2004-07-05 08:06 Elijah O. Alcantara <elijah@asti.dost.gov.ph>
2004-07-05 08:13 ` Re: Bad date external representation V i s h a l Kashyap @ [Sai Hertz And Control Systems] <sank89@sancharnet.in>
0 siblings, 1 reply; 3+ messages in thread
From: Elijah O. Alcantara @ 2004-07-05 08:06 UTC (permalink / raw)
To: pgsql-php
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.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Bad date external representation
2004-07-05 08:06 Bad date external representation Elijah O. Alcantara <elijah@asti.dost.gov.ph>
@ 2004-07-05 08:13 ` V i s h a l Kashyap @ [Sai Hertz And Control Systems] <sank89@sancharnet.in>
2004-07-05 09:09 ` Re: Bad date external representation Elijah O. Alcantara <elijah@asti.dost.gov.ph>
0 siblings, 1 reply; 3+ messages in thread
From: V i s h a l Kashyap @ [Sai Hertz And Control Systems] @ 2004-07-05 08:13 UTC (permalink / raw)
To: Elijah O. Alcantara <elijah@asti.dost.gov.ph>; +Cc: pgsql-php
Dear Elijah ,
>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);
>>
>>
fetch results by pg_fetch_result and then insert the data
>>$query = "Insert into temp_organizationinfo
>>VALUES('$ctrl_no','$organization_name','$domain_name','$loginID','$loginPassword','$date_created','$date_modified',4)";
>>pg_Exec($connectGovPH, $query);
>>
>>
--
Best Regards,
Vishal Kashyap
Director / Lead Software Developer,
Sai Hertz And Control Systems Pvt Ltd,
http://www.saihertz.com
Yahoo IM: coeb_college[ a t ]yahoo.com
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Bad date external representation
2004-07-05 08:06 Bad date external representation Elijah O. Alcantara <elijah@asti.dost.gov.ph>
2004-07-05 08:13 ` Re: Bad date external representation V i s h a l Kashyap @ [Sai Hertz And Control Systems] <sank89@sancharnet.in>
@ 2004-07-05 09:09 ` Elijah O. Alcantara <elijah@asti.dost.gov.ph>
0 siblings, 0 replies; 3+ messages in thread
From: Elijah O. Alcantara @ 2004-07-05 09:09 UTC (permalink / raw)
To: pgsql-php
Thanks for the reply =)
But it looks like we have an old version of php - 4.0.6
pg_fetch_result
(PHP 4 >= 4.2.0) =(
it looks like I need to use pg_fetch_row instead.
Thanks again,
Elijah =)
On Mon, 2004-07-05 at 16:13, V i s h a l Kashyap @ [Sai Hertz And
Control Systems] wrote:
> Dear Elijah ,
>
> >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);
> >>
> >>
> fetch results by pg_fetch_result and then insert the data
>
> >>$query = "Insert into temp_organizationinfo
> >>VALUES('$ctrl_no','$organization_name','$domain_name','$loginID','$loginPassword','$date_created','$date_modified',4)";
> >>pg_Exec($connectGovPH, $query);
> >>
> >>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2004-07-05 09:09 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-07-05 08:06 Bad date external representation Elijah O. Alcantara <elijah@asti.dost.gov.ph>
2004-07-05 08:13 ` V i s h a l Kashyap @ [Sai Hertz And Control Systems] <sank89@sancharnet.in>
2004-07-05 09:09 ` Elijah O. Alcantara <elijah@asti.dost.gov.ph>
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