I currently have this line of code, which works perfectly:
$data2 = mysql_query("SELECT * FROM notes WHERE HiveID=" . $HiveID) or die(mysql_error());
I want to reverse the order of my listing, so I tried adding the ORDER BY after WHERE. I tried the following code:
$data2 = mysql_query("SELECT * FROM notes WHERE HiveID=" . $HiveID . "ORDER BY Date DESC") or die(mysql_error());
This code gave me the 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 'BY Date DESC' at line 1.
I am unaware of how I can get this to work, and any help will be greatly appreciated.