rcharris Posted October 23, 2006 Share Posted October 23, 2006 Hi all,Something I;ve never done here before, so any help would be appreciated, if you have time please :)I've got the following code, and basically, I want to order a manually entered in date (mm/dd/yyyy with the latest date at the top and the furthest away at the bottom[quote] <?php // Connect to the database server $dbcnx = @mysql_connect('n/a', 'n/a', 'n/a'); if (!$dbcnx) { exit('<p>Unable to connect to the ' . 'database server at this time.</p>'); } // Select teh portfolio database if (!@mysql_select_db('n/a')) { exit('<p>Unable to locate the portfolio ' . 'database at this time.</p>'); } // Request the text of all the news stories$result = @mysql_query('SELECT title, id, content,date1, updated, url, picturename FROM news ORDER BY date1 ASC'); if (!$result) { exit('<p>Error performing query: ' . mysql_error() . '</p>'); } // Display the text of each joke in a paragraph while ($row = mysql_fetch_array($result)) { echo "{$row['date1']}<br /><a href=\"newsstory.php?story={$row['id']}\" class='noba_10_news_nav'>{$row['title']}</a><br /><img src='images/whiteline_154.gif' width='154' height='9'><br />";} ?> [/quote](obv. ive removed the db details :))Thanks :) Quote Link to comment Share on other sites More sharing options...
gmwebs Posted October 23, 2006 Share Posted October 23, 2006 Perhaps change the ASC to DESC in your ORDER BY statement? Quote Link to comment Share on other sites More sharing options...
rcharris Posted October 23, 2006 Author Share Posted October 23, 2006 Ahh! It works, THANK YOU =DMade my day ;) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.