yeah, so the problem is that yo are using reserved words for the table name and columns names.
see a list of reserved words here:
you table name is date which a MySQL function, it is also a PHP function.
and one of your columns is named:
that is a function for the order BY Clause:
ORDER BY columnName DESC
meaning order the records by the columnName column in descending order.
to prevent using reserved words I use a naming convention that is more descriptive for tables. instead of just 'date', what does the date refer to? for example:
then in the column names, i preface the table name:
using this naming convention, i can ensure that i will never use a reserved word.