propelorm/Propel — pull request #775 by thedave80 (2013-10-15 15:31:22+00:00)
Title: DebugPDO executedQueryString - quoting

When displaying executed query from DebugPDO (i.e. in FirePHP), sometimes the outputted query is not valid.
This can be fixed with a simple quoting in DebugPDOStatement class.

Before: http://d.pr/i/Mgyi
After: http://d.pr/i/Xx6X

Some examples:

// works without change
$con = Propel::getConnection();
$con->query("SELECT * FROM temp WHERE name LIKE '%david%'");

// also works
$prepStmt = $con->prepare("SELECT * FROM temp WHERE name LIKE :name");
$prepStmt->bindValue('name', '%david%');
$prepStmt->execute();

// does not work, since params get quoted different
$con = Propel::getConnection();
$prepStmt = $con->prepare("SELECT * FROM temp WHERE name LIKE :p1");
$prepStmt->execute(array(':p1' => '%john%'));