SQLSTATE[42000]: Syntax error or access violation: 1064 error
Symptom
When updating to WHMCS 8.10.0, you may see the following error:
SQLSTATE[42000]: Syntax error or access violation: 1064 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 'as `s` where `s`.`task_id` = ?' at line 1 (SQL: delete from `tbltask_status` as `s` where `s`.`task_id` = 35)
Cause
The syntax used in an update routine is not compatible with MySQL 5.x.
Solution
We have published version 8.10.1 which resolves the issue. To apply the update once you have encountered this error:
- Go to https://download.whmcs.com/#patch.
- Download the V8.10.1 patch file.
- Extract and upload the new files to your existing installation folder, replacing any existing folders and files.
- Visit
/install/install.php
. - Follow the on-screen instructions to complete the update process.
- Delete
/install
directory.
WHMCS is now updated to V8.10.1 which resolves the error.