Archives Have Been Found

Writen By Tyler Ingram on Dec 20, 2006

Well in a previous post about PayPerPost they requested that I had some sort of Archive listing of my posts to make finding posts a bit easier. Well after a couple of hours fine tuning it I have managed to create some sort of archive script that will list the entries for a particular month in a particular year.

Currently I only have postings for this year as you can see from the Archive menu down the left side of the site.  It was not too difficult to create, I had to add a new mod_rewrite rule into my .htaccess script that would parse the friendly URL.  Once that was done then it was as easy and doing a regular MySQL Query for the particular date range similar to this:

MySQL Query

SELECT * FROM myTable WHERE date_entered >= ‘CurrentYear-CurrentMonth-01 00:00:01′ AND date_entered <= ‘CurrentYear-CurrentMonth-31 23:59:59′:

Once I get the result from the query I parse throught it and make it pretty. Though once we get into 2007 I will have to figure out how I want to be able to look back a year. I currently keep the Months and Years in seperate arrays and run through nested loops.

So hopefully PayPerPost approves of my archives and they can review my previous posting about them. I would hate to have to post negative about their service. So far they have been great.

Posted in: Uncategorized

 One Response to "Archives Have Been Found"

  • You can redirect your old feed to feedburner so that it will count all your feed subscribers. Details on how to do that are in the feedburner forums and their blog.




All page content copyright © 2006-2010 by Tyler Ingram Images protected by Attributuion-Noncommerical-No Derivative Work CC License

Theme Created & Maintained by DynamicShark Media