I am getting this the following MAX_JOIN_SIZE error when I deploy my cakephp v3 app to shared hosting:
Error: SQLSTATE[42000]: Syntax error or access violation: 1104 The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
This seems like a common problem, but can anyone tell me how to get round this when using cakephp v3.x? I have tried putting the following code in app/src/Model/AppModel.php:
function beforeFind() {
$this->query('SET SQL_BIG_SELECTS=1');
}
but this doesn't seem to have any effect.