Situation
This is when in patient dashboard and attempting to the click the Advance Directives edit button on the right of the patient window, the popup contains the below SQL error. @sjpadgett is this one you can help with?
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
/var/www/interface/patient_file/summary/advancedirectives.php at 123:sqlStatement
Is it possible this is being cached elsewhere? I’m running on a local test server but the query does not appear to be getting updated. Produces the same error each time.
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=0 AND documents.foreign_id=0 AND documents.deleted = 0 ORDER BY documents.date DESC
That works in sqlyog, i changed the ? to 0 and I got back no results.
MariaDB is throwing this error back at SQLyog when unchanged:
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 ‘? AND documents.foreign_id=? AND documents.deleted = 0 ORDER BY documents.dat…’ at line 1