Answers for "Prepared statement needs to be re-prepared"

PHP
0

Prepared statement needs to be re-prepared

Enable the ATTR_EMULATE_PREPARES of PDO (disabled by default at Laravel) for resolve the problem. Just insert the option config:

'options'   => [
                \PDO::ATTR_EMULATE_PREPARES => true
            ]
Example:

        'mysql' => [
            'driver'    => 'mysql',
            'host'      => env('DB_HOST', 'localhost'),
            'database'  => env('DB_DATABASE', 'forge'),
            'username'  => env('DB_USERNAME', 'forge'),
            'password'  => env('DB_PASSWORD', ''),
            'charset'   => 'utf8',
            'collation' => 'utf8_unicode_ci',
            'prefix'    => '',
            'strict'    => false,
            'options'   => [
                \PDO::ATTR_EMULATE_PREPARES => true
            ]
        ],
Posted by: Guest on July-01-2021

Code answers related to "Prepared statement needs to be re-prepared"

Browse Popular Code Answers by Language