I recently wrote an application (cgi w/ perl) for a client that is for all
intents and purposes, a modified guestbook. The date of the post is stored as
a YYYYMMDD timestamp in my mySQL database and parsed out (via substr() ) when i
go to display it.
At the present, all the guestbook entries dump on one page.
However the client has asked me to change it so that the frontend of the script
is a page of by month links..
The problem here is that the month breakdown is supposed to be year insensitive
(a post from 1997 or a post from 2007 in August should show up on the august
page).
Since the date is settable through a backend admin script [the "guestbook"
posts are done by the page owner] and isn't set by the date it was posted, the
script is completely year insensitive in and of itself.
I'd like to setup the bymonth breakdown and keep things insensitive - so if the
client posts an entry and dates it 10 or 15 years ago, it falls in with the
1999, 2000, 2001 entries, etc..
Anyone have any ideas on how to easily approach this with the mySQL query? (not
too familiar with mySQL's pattern matching - the solution may lay there if
someone can point me in the right direction..)
thanks,
-brendan
--
Brendan W. McAdams | H: (305)859-2181
Programmer/Systems Administrator | W: (305)377-2880
Plexus InterActive | email:brendan@stripped
http://www.plexmedia.com
"Always listen to experts. They'll tell you what can't be done, and why. Then
do it. "
-- Robert A. Heinlein