Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8771087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:41:56+00:00 2026-06-13T17:41:56+00:00

Ok, so. I have asked about 5 questions on stackOverflow today, you’ve all been

  • 0

Ok, so. I have asked about 5 questions on stackOverflow today, you’ve all been so helpful.

Now, i’m a designer, learning to code, so bear with me.

I have a mySQL table, with a small CMS/Blog im building.
I have it styled how I want to now.
This is the code for the page.

$result = mysql_query("SELECT * FROM Blog");
while($row = mysql_fetch_array($result))
{
    echo "<h1>" . $row['Title'] . "</h1>";
    echo "<br>";
    echo "<h2>" . "Posted on:   " . $row['Date'] . "</h2>";
    echo "<br>";
    echo "<img src='".$row['Image']."'/>";
    echo "<br>";
    echo $row['Message'];
    echo "<br>";
    echo "<br>";
}

I’m still working on it so its all good.

What I want to know is, this code is outputting my sql data into a page. Is there any way of telling the page what order to echo the data, for instance. in my SQL table i have:

2012-11-03 16:16:06     This is my First Blog Post  This is the first message of the first blog post. ...   http://blog.gettyimages.com/wp-content/uploads/201.

and next is

2012-11-03 16:17:29     This is my Second Blog Post     This is the second message of the Second Post, You...   http://www.aviation-images.com/user/zooms/118/451n...

How can i tell the page to Always display the most recent post at the top, and older ones below.?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T17:41:58+00:00Added an answer on June 13, 2026 at 5:41 pm

    Use order by in your query:

    $result = mysql_query("SELECT * FROM Blog ORDER BY Date DESC");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know similar questions have been asked, but I'm not sure about the answers
The majority of my questions I've asked here so far on StackOverflow have been
I'm aware that questions about the stack vs. the heap have been asked several
I have been looking through the questions asked on StackOverflow, but there are so
A lot of questions have been asked about gem support in Shoes, but none
I realize that similar questions have been asked about this before here on SO,
So I've asked a couple of questions about performing joins and have had great
i have asked a question about manytomanyfield here which i solved but now a
I have been asked to post a new question about how to correctly sort
I have asked What should i know about search engine crawling? Now i would

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.