Re: comparing dates

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Re: comparing dates
Дата
Msg-id GNELIHDDFBOCMGBFGEFOKEPOCCAA.chriskl@familyhealth.com.au
обсуждение исходный текст
Ответ на comparing dates  (Joseph Syjuco <joseph@asti.dost.gov.ph>)
Список pgsql-php
Use mktime to convert them both to unix timestamps and then compare them as
integers, or compare them in the database directly.

Chris


> -----Original Message-----
> From: pgsql-php-owner@postgresql.org
> [mailto:pgsql-php-owner@postgresql.org]On Behalf Of Joseph Syjuco
> Sent: Saturday, 6 July 2002 4:33 AM
> To: PHP-PGSQL
> Subject: [PHP] comparing dates
>
>
> how do i compare the current date to a date field in my database
> e.g.
> $current_date = date('Y=m-d');
> $dbdate = pg_result($rsdate,0,"exam_date");
> if ($current_date>$dbdate) --THIS PART DOESNT WORK
>     echo "Today is not your exam date";
> TIA
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
>




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

Предыдущее
От: Joseph Syjuco
Дата:
Сообщение: comparing dates
Следующее
От: Keary Suska
Дата:
Сообщение: Re: comparing dates