After installation: QUERY ERROR

Hello,
Am I the only one who is getting this error?

I check for the Advance Directives, I am getting this error:

Query Error

ERROR: query failed: SELECT documents.date, documents.id FROM documents INNER JOIN categories_to_documents ON categories_to_documents.document_id=documents.id WHERE categories_to_documents.category_id=? AND documents.foreign_id=? AND documents.deleted = 0ORDER BY documents.date DESC

Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘BY documents.date DESC’ at line 1

/home/dquaatgn/public_html/zinc/interface/patient_file/summary/advancedirectives.php at 123:sqlStatement