Re: Date type: DATE

Поиск
Список
Период
Сортировка
От Mathew Dredge
Тема Re: Date type: DATE
Дата
Msg-id 001b01c2c36e$9f8975c0$2100a8c0@mathewslaptop
обсуждение исходный текст
Ответ на Date type: DATE  (Jesus Rios <galiza-vermelha@wanadoo.es>)
Список pgsql-php
Try putting single quotes around the date, this works for me..

insert into s_objetivos_caso values ($dni,'$date',$cod_s_objetivos,$conn);


----- Original Message -----
From: "Jesus Rios" <galiza-vermelha@wanadoo.es>
To: "POSTGRESLQ-PHP" <pgsql-php@postgresql.org>
Sent: Thursday, January 23, 2003 5:59 AM
Subject: [PHP] Date type: DATE


>
> Hi everybody.
>
> I've got a form where I ask for the date.I store the date in 3 variables:
for
> the day i have $day (dd), for the month i have $month (mm)  and for the
year
> $year (yyyy).
> At the same time i have a table which is as it follows:
>  Table "s_objetivos_caso"
>         Column      |  Type   | Modifiers
>        -----------------+---------+-----------
>  dni                    | integer | not null
>  fecha                | date    | not null
>  cod_s_objetivos | integer | not null
>
> How do i have to insert the column date?.
>
>   $date="$year-$month-$day";
>   insert into s_objetivos_caso values ($dni,$date,$cod_s_objetivos,$conn);
>
> Can anyboy help me for how a i  must format the date for introduce into
the
> table???
>
>
> Thank you. And sorry with my English.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>


В списке pgsql-php по дате отправления:

Предыдущее
От: Manuel Lemos
Дата:
Сообщение: Re: PHP Abstraction Layer - Your Opinion Please
Следующее
От: "Alan T. Miller"
Дата:
Сообщение: Re: Date type: DATE