Forum Moderators: coopster
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY 'date' DESC' at line 1
This is what I have, with some extra parts that count the number of rows and some echos:
include('connect.php');
mysql_connect($mysql_server, $mysql_user, $mysql_password) or die(mysql_error());
mysql_select_db($mysql_database2) or die(mysql_error());
$result = mysql_query("SELECT * FROM $mysql_posts_table2 LIMIT 2 ORDER BY 'date' DESC")
or die(mysql_error());
It works until I put the ORDER BY section in. Any help?
[edited by: tr8er8 at 3:26 am (utc) on Feb. 19, 2008]