RE: Sorting db Entries by Year-Month -- Solved
| From: | Andre Dubuc | Date: | Wed, 24 Jul 2002 02:35:15 +0000 |
| Subject: | RE: Sorting db Entries by Year-Month -- Solved | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-109194@lists.php.net to get a copy of this message | ||
Thanks to BigDog and John Holmes for their suggestions.
I figured it out: it was rather easy, in hindsight, of course:
<?php
$today = getdate();
$month = $today['mon'];
. . .
$query = "SELECT * FROM guest WHERE pdate ~ '{$month}'";
. . .
?>
Works as expected.
Regards,
Andre