| Welcome to WebmasterWorld Guest from 220.127.116.11 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Pubcon Platinum Sponsor 2014|
|Getting my head round dates with sql.|
I've been scratching my head about this for a while now.
I have a my sql DB that has a kind of diary in it.
I use a timestamp in this format 0000-00-00 00:00:00
OK this is what I want to do. Go through each day of the month and if there is an entry in the database for that day do something if not dont do anything.
It's just how I loop through the days of each month and stuff.
Maybe its the creation of the dates i'm stuck with.
Any help would be greatly appreciated!
Try a query like this:
$query = "SELECT * FROM table WHERE MONTH(timestamp) = '10'";
This should select all the rows where the month is '10'
Good luck! :)
That is amazing.
I had to do some other stuff too but that really helped me find the sql functions page!
Thank you kindly!
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved