From: Date: August 27 1999 4:31pm Subject: Weird mySQL Query through perl script List-Archive: http://lists.mysql.com/mysql/11505 Message-Id: <99082710391000.01111@acheron.plexmedia.net> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable I recently wrote an application (cgi w/ perl) for a client that is for al= l intents and purposes, a modified guestbook. The date of the post is stor= ed 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 insen= sitive (a post from 1997 or a post from 2007 in August should show up on the aug= ust 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.=20 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 t= he 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 i= f someone can point me in the right direction..) thanks,=20 -brendan --=20 Brendan W. McAdams | H: (305)859-2181 =20 Programmer/Systems Administrator | W: (305)377-2880=20 Plexus InterActive =09 | email:brendan@stripped=20 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