$sth = $dbh->prepare("select * from hoge where id=?"); $paramId = 12345; $sth->bindParam(1, $paramId, PDO::PARAM_INT); echo preg_replace('/id=\?$/', 'id='.$paramId, $sth->queryString);
参考:
php - Getting a PDO query string with bound parameters without executing it - Stack Overflow
サーバ側でログを取るのはどうでしょう?
プレースホルダ部がどう記録されるのかは分かりませんが。
http://www.howtogeek.com/howto/database/monitor-all-sql-queries-in-mysql/