![]() |
[PHP/MySQL] monthly archives
I have a blog and I want to setup archive links for my entries split up by month. My first thought on how to do this would be to use an IF condition with my date timestamp for each entry, but I'm using a DATE_FORMAT function in my query to format the date like this:
PHP Code:
|
Well, there is no "IF" in SQL, just WHERE...
Aren't you just wanting a WHERE clause like: WHERE entrydate>'somedate' AND entrydate<'someotherdate' |
Not quite sure what you're trying to do but maybe something like:
PHP Code:
|
Quote:
Thanks! |
u know... what you could try is installing phpmyadmin
then do queries with the script until it gives back the results u want and have it convert the query to php and walah... u have ur querey ready togo |
All times are GMT -8. The time now is 02:39 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project