<?php
$sql =<<<SQL
select * from demo where id = :id and namae = :hoge;
SQL;
$dbh = new PDO('mysql:host=localhost;dbname=test', $user, $pass);
$id = 123;
$hoge = "hoge";
$sth = $dbh->prepare($sql);
$sth->bindValue(':id', $id, PDO::PARAM_INT);
$sth->bindValue(':hoge', $hoge, PDO::PARAM_STR);
$sth->execute();
//mysql log?https://github.com/panique/pdo-debug:$sth->debugDumpParams();
$fval = array(
':id'=>1,
':name'=>"hoge"
);
$sth = $dbh->prepare($sql);
$sth->execute($fval);
print PdoDebugger::show($sql, $fval);
$sth->debugDumpParams();