- Timestamp:
- Jan 8, 2004, 9:29:36 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/includes/functions.inc
r4121 r4545 1 1 <?php 2 2 3 # $Id: functions.inc,v 1. 2 2003/12/05 23:47:52mij Exp $3 # $Id: functions.inc,v 1.3 2004/01/08 21:29:36 mij Exp $ 4 4 # Copyright (c) 2003, OpenDarwin 5 5 … … 19 19 global $DOCUMENT_ROOT, $connect; 20 20 21 $query = "SELECT id, title, news FROM headlines ORDER BY timestampDESC LIMIT 10";21 $query = "SELECT id, title, news FROM headlines ORDER BY id DESC LIMIT 10"; 22 22 $result = mysql_query($query) or die("Error: $query."); 23 23 if(!$result) { … … 77 77 global $connect; 78 78 79 $query = "SELECT id, DATE_FORMAT(timestamp, '%e %b %Y, %l:%i %p') AS f_timestamp, title, news FROM headlines ORDER BY timestampDESC LIMIT 5";79 $query = "SELECT id, DATE_FORMAT(timestamp, '%e %b %Y, %l:%i %p') AS f_timestamp, title, news FROM headlines ORDER BY id DESC LIMIT 5"; 80 80 $result = mysql_query($query) or die("Error: $query."); 81 81 if(!$result) { … … 239 239 echo "<p>Below is a list of all existing news headlines. They can be viewed, edited, or deleted from this interface. Alternatively, you can also <a href=\"add.php\">add news</a>.</p>\n\n"; 240 240 241 $query = "SELECT id, title, DATE_FORMAT(timestamp, '%e %b %Y, %l:%i %p') AS f_timestamp FROM headlines ORDER BY timestampDESC";241 $query = "SELECT id, title, DATE_FORMAT(timestamp, '%e %b %Y, %l:%i %p') AS f_timestamp FROM headlines ORDER BY id DESC"; 242 242 $result = mysql_query($query) or die("Error: $query."); 243 243 if(!$result) {
Note: See TracChangeset
for help on using the changeset viewer.