From: | Keary Suska <hierophant(at)pcisys(dot)net> |
---|---|
To: | Postgres-PHP <pgsql-php(at)postgresql(dot)org> |
Subject: | Re: Date type: DATE |
Date: | 2003-01-24 17:03:24 |
Message-ID: | BA56BFEC.17907%hierophant@pcisys.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-php |
on 1/24/03 12:26 AM, amiller(at)hollywood101(dot)com purportedly said:
> $date = $year . "-" . $month . "-" . $day;
> insert into s_objetivos_caso values ($dni,$date,$cod_s_objetivos,$conn);
>
> or right in the the query itself...
>
> insert into s_objetivos_caso values ($dni,$year . "-" . $month . "-" .
> $day,$cod_s_objetivos,$conn);
>
> you would need to check that second way to be sure, but the first one will
> work for sure.
Neither of these will work, nor any previous suggestion, as date formats are
ambiguous and *must* be quoted:
$date = $year . "-" . $month . "-" . $day;
insert into s_objetivos_caso values ($dni,"'$date'", $cod_s_objetivos,$conn
);
This *will* work, at least as far as the date is concerned.
Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"
From | Date | Subject | |
---|---|---|---|
Next Message | Sharmad Naik | 2003-01-24 17:08:34 | Re: pg_result |
Previous Message | Frank Bax | 2003-01-24 12:15:33 | Re: Date type: DATE |