I'm getting the "could not find driver" error.... Any ideas? I've stared at this for a long time so I need a fresh set of eyes on it. Thanks!
<?php
try {
$objDb = new PDO('myql:host=localhost;dbname=test',
'$user', '$pass');
$objDb->exec('SET CHARACTER SET utf8');
$sql = "SELECT *
FROM 'departments'
WHERE 'code' = 0";
$statement = $objDb->query($sql);
$list = $statement->fetchAll(PDO::FETCH_ASSOC);
} catch(PDOException $e) {
echo $e->getMessage();
}
?>
I'm at a loss....I have all of this setup at home so I have root to everything. Here's what I know:
**phpinfo()**
**PDO**
PDO support enabled
PDO drivers mysql
**pdo_mysql**
PDO Driver for MySQL enabled
Client API version mysqlnd 5.0.10 - 20111026 - $Id: b0b3b15c693b7f6aeb3aa66b646fee339f175e39 $
**mysql**
MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version mysqlnd 5.0.10 - 20111026 - $Id: b0b3b15c693b7f6aeb3aa66b646fee339f175e39 $