我正在使用我的本地wamp服务器并尝试从phpMyAdmin检索数据。但我收到了一个错误。
找不到驱动程序500内部服务器错误 - PDOException
我的routing.yml
# This file is auto-generated during the composer install
parameters:
database_driver: pdo_mysql
database_host: www.example.com
database_port: null
database_name: mydb
database_user: myuser
database_password: mypass
mailer_transport: smtp
mailer_host: www.example.com
mailer_user: null
mailer_password: null
locale: en
secret: ThisTokenIsNotSoSecretChangeIt
database_path: null
我的控制器
$connection = $this->get("database_connection");
$statement = $connection->prepare("SELECT * FROM table");
$statement->execute();
$tabs = $statement->fetchAll();