Why is not possible disabling quote identifiers for Mysql platform?

I try to disable quote identifiers from config, but it seems only valid for IbmDb2 platform.

$adapter = new Laminas\Db\Adapter\Adapter([
    'driver' => 'Pdo_Mysql',
    'database' => 'drapp',
    'hostname' => '127.0.0.1',
    'port' 	   => '3306',
    'username' => 'drapp',
    'password' => '123456',
    'platform' => 'Mysql',
    'platform_options' => ['quote_identifiers' => false],
]);

Only IbmDb2 and Oracle.

Is it possible to add Mysql ?

No, because disabling them in MySQL leads to quite a number of SQLi vectors.

1 Like

Thanks for the answer.

But in our project we want to send a value to join clause, is it possible without disabling quote identifiers ?
Related question is below.

Not sure I fully understand the problem - if you are trying to reference a value and you don’t want it quoted, i.e. sl.lang_id = 3 and not sl.lang_id = ‘3’ then use Zend Sql Expressions

1 Like