Guides & Tutorials8.10 UpdateTroubleshootingSQLSTATE[42000]: Syntax error or access violation: 1064 error

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:

  1. Go to https://download.whmcs.com/#patch.
  2. Download the V8.10.1 patch file.
  3. Extract and upload the new files to your existing installation folder, replacing any existing folders and files.
  4. Visit /install/install.php.
  5. Follow the on-screen instructions to complete the update process.
  6. Delete /install directory.

WHMCS is now updated to V8.10.1 which resolves the error.