| 3:03 pm on Jun 18, 2009 (gmt 0)|
to get the newest content on the main page you just select by date desc, if you set a limit then the older ones will just drop off as more are posted
for the link just select the story with the max id, I assume there is an id of some kind. You could also select by date descending and limit to 1 result
| 3:48 pm on Jun 18, 2009 (gmt 0)|
So for the archive links at the top, how would they automatically happen? and could i put a date in big bold header of when the blog was produced?
| 4:09 pm on Jun 18, 2009 (gmt 0)|
most blogs group by date or category so you could do your archives using 1 of those options I would think.
| 8:06 am on Jun 19, 2009 (gmt 0)|
how would i go about this?
| 1:33 pm on Jun 19, 2009 (gmt 0)|
just as an aside, why are you recoding the wheel on this? Especially if it is for a client, There is a ton of blog software out there. Just wondering ;)
I would suggest getting some of that software and studying how it does the things you want to do, you can then reproduce it more easily.
each post would need to be in a category
you could then write a select query that does what I laid out
to list the number in a cat
select count(post_id) as totalposts from posts where cat_id=3
then a page of listings, newest to oldest
select * from posts where cat_id=3 order by postdate desc limit 10
or something of that nature
| 2:43 pm on Jun 19, 2009 (gmt 0)|
Before you try and order by date, are you actually storing the date in a field with the post?
If not look at the mysql date and time functions, especially NOW() to store the current time with the post.
| 11:42 am on Jun 22, 2009 (gmt 0)|
i have decided to use and adapt b2 evolution blog which is great because i can learn while im doing it.
It's a pain not knowing probaly the most simplest things.
I've been doing this now for 9 months and all self taught, so thank you all for your help