You need to do this:
$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);
before you call $db->prepare().
hint: if you did this:
$db->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
(see http://us2.php.net/manual/en/ref.pdo.php#pdo.error-handling)
you'd get an exception:
'SQLSTATE[HY000]:
Is it not possible to run the "show create table __" via PDO? I swear I
was able to do this in the past, and for some reason this is not
working. Am I doing something wrong, is this a bug, or is this planned?
Pasted below is the mysql command and result expected, test code, and
its result.