Jump to content

Archiving


Caligo

Recommended Posts

Not sure if PHP is what I should use but anyways...I want to be able to have, on a page of my site, the newest five site updates or news articles as suchand everytime I do another update or article the oldest of the five goes to an archive. just a simple text list of the date and title of each with the actual article/update info directly underneath, just like i do on the page to which the link was given. css not needed.not sure how much sense i am making. if any more explaination is needed ask and ill try to explain better

Link to comment
Share on other sites

What part of it are you having problems with? You need to store the articles or whatever in a database with a timestamp and when you get them from the database, order them descending by the timestamp and use the LIMIT clause to only get the first 5.

Link to comment
Share on other sites

What part of it are you having problems with? You need to store the articles or whatever in a database with a timestamp and when you get them from the database, order them descending by the timestamp and use the LIMIT clause to only get the first 5.
i was asking how i should go about it. i know almost nothing about php so i wanted to find out what functions i would need to use. that was my real question. sorry about that
Link to comment
Share on other sites

Well, to work with MySQL in PHP you need to use these:http://www.php.net/manual/en/function.mysql-connect.phphttp://www.php.net/manual/en/function.mysql-select-db.phphttp://www.php.net/manual/en/function.mysql-query.phphttp://www.php.net/manual/en/function.mysql-fetch-assoc.phpYou don't need to use many functions other then those, just some procedural statements to loop through the result and things like that.

Link to comment
Share on other sites

Well, to work with MySQL in PHP you need to use these:http://www.php.net/manual/en/function.mysql-connect.phphttp://www.php.net/manual/en/function.mysql-select-db.phphttp://www.php.net/manual/en/function.mysql-query.phphttp://www.php.net/manual/en/function.mysql-fetch-assoc.phpYou don't need to use many functions other then those, just some procedural statements to loop through the result and things like that.
alrighty, thanks. :)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...