prepared statement needs to be re prepared

Solutions on MaxInterview for prepared statement needs to be re prepared by the best coders in the world

showing results for - "prepared statement needs to be re prepared"
Yannik
15 May 2018
1Enable the ATTR_EMULATE_PREPARES of PDO (disabled by default at Laravel) for resolve the problem. Just insert the option config:
2
3'options'   => [
4                \PDO::ATTR_EMULATE_PREPARES => true
5            ]
6Example:
7
8        'mysql' => [
9            'driver'    => 'mysql',
10            'host'      => env('DB_HOST', 'localhost'),
11            'database'  => env('DB_DATABASE', 'forge'),
12            'username'  => env('DB_USERNAME', 'forge'),
13            'password'  => env('DB_PASSWORD', ''),
14            'charset'   => 'utf8',
15            'collation' => 'utf8_unicode_ci',
16            'prefix'    => '',
17            'strict'    => false,
18            'options'   => [
19                \PDO::ATTR_EMULATE_PREPARES => true
20            ]
21        ],