Simple Blog

Hey guys,

I am currently creating a simple PHP, MYSQL based blog so that I can supply my clients with a back-end news update page. I am aware of Blogger and other such services and it is because I am fed up of customising stylesheets on them that I am doing my own.

Anyway all working great, can add, delete and edit existing posts but I also want to list the posts on the page in the correct order by date. How is this typically done?

Is there a way of doing it with MYSQL or is it done with PHP ?

I am one of these lazy developers who tends to just use SELECT, INSERT INTO and DELETE with not much else I am afraid.

Guess it’s because as I have never had the need to make sophisticated SQL commands.

Anyway your advice would be much appreciated.



If you’re storing the date the post was created (created_on, for example), it’s pretty trivial. :slight_smile:

SELECT id, title, content FROM post ORDER BY created_on DESC;

Thanks Anthony,

Thats working great :wink:

Hi silv

Not sure if you’re aware of it but you might want to look at ckeditor too for your news editor to create and edit articles. Very good piece of kit and your clients will love you for it :wink:

Hey thanks Tango I will check it out. Hope ur doing ok. Finshed that CMS mod finally, hows things?

Lol, my CMS? Never finished lol. Yeah apart from that i’m good :wink:

Cool, glad to hear it, have been exploring php bigtime lately, its a very elegant language, have a few things I’d like to ask you about your way of doing, will drop you a pm.:wink:

Sure thing.