I have a responses table, with filter set on the Quesion field. Whenever I filter on the Question ‘Apart from the library, where do you like to study on campus? Be it for 5 minutes of 5 hours, we would like to understand what areas you use.’ the sql errors with a syntax error
[2025-02-03T02:33:26.620899+00:00] log.DEBUG: SELECT COUNT(*) FROM the library, where do you study on campus? Be it for 5 minutes or 5 hours we’d like to understand what areas you use.' {"params":[],"types":[],"executionMS":0.0011131763458251953} []
A similar filter for the question ‘Agree or disagree? There are suitable parks and green spaces on or near campus for me to access.’ is fine and logs
[2025-02-03T02:12:49.804239+00:00] log.DEBUG: Executing query: SELECT * FROM Responses WHERE `Question` = 'Agree or disagree? There are suitable parks and green spaces on or near campus for me to access.' ORDER BY `SurveyID` DESC, `RespondentID` ASC, `ResponseID` ASC LIMIT 20 {"params":[],"types":[]} []
[2025-02-03T02:12:50.064853+00:00] log.DEBUG: SELECT * FROM Responses WHERE `Question` = 'Agree or disagree? There are suitable parks and green spaces on or near campus for me to access.' ORDER BY `SurveyID` DESC, `RespondentID` ASC, `ResponseID` ASC LIMIT 20 {"params":[],"types":[],"executionMS":0.26059699058532715} .......
So I figure it’s not the length of the question. Other questions with commas also are fine?
I’m not sure how to further debug this, any thoughts appreciated.
/opt/bitnami/apache/htdocs/intuition/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php(86): An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1064 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 ‘where do you like to study on campus? Be it for 5 minutes of 5 hours, we woul…’ at line 1
} else {
**$this->TotalRecords = $this->listRecordCount();**
$this->StartRecord = 1;
if ($this->DisplayRecords <= 0 || ($this->isExport() && $this->ExportAll)) { // Display all records
$this->DisplayRecords = $this->TotalRecords;
}
if (!($this->isExport() && $this->ExportAll)) { // Set up start record position
$this->setupStartRecord();
}
...