Possible Duplicate:
PDO Prepared Statements
I'm sure the answer to this is very simple, but I don't seem to be able to find it.
I'm using PDO (PHP Data Objects) to run a query against a MySQL database, and would find it useful to display the prepared query before it is executed against the DB.
Is there any way of doing this? For example:
$query = 'SELECT Id, Name, Comment FROM Users WHERE Id = :id';
$pdoStatement = $db->prepare($query);
$pdoStatement->bindValue(':id', $id);
// How can I view the actual statement that will be executed, showing the real
// value that will be used in place of ':id'
$pdoStatement->execute();