I'm receiving this syntax error
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 'DESC'
from this code
$insert_status=mysql_query("INSERT INTO status(status, date) VALUES
('$status','$date')") or die (mysql_error());
$get_status= mysql_query("SELECT * FROM status WHERE id DESC")
or die (mysql_error());
while($row=mysql_fetch_array($get_status)){
$status=$row['status'];
$date=$row['date'];
}
Mysql version is 5.0.91-community
How can I resolve this small issue? Thanks in advance
id? What does your table schema look like?status(idint(255) NOT NULL AUTO_INCREMENT,statustext NOT NULL,uservarchar(255) NOT NULL DEFAULT '',datevarchar(255) NOT NULL DEFAULT '', PRIMARY KEY (id) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=31 ;