Skip to content

Helpers::dumpSql() should parse named params#78

Open
insekticid wants to merge 1 commit into
nette:masterfrom
insekticid:issue-77
Open

Helpers::dumpSql() should parse named params#78
insekticid wants to merge 1 commit into
nette:masterfrom
insekticid:issue-77

Conversation

@insekticid

Copy link
Copy Markdown
Contributor

In PDO you can bind named params bindValue('something', 1, PDO::TYPE);

So you can use ResultSet like this

$query = 'SELECT * FROM table WHERE id = :something';
$params[':something'] = 1;
$resultSet = new ResultSet($connection, $query, $params);
$connection->onQuery($connection, $resultSet);// log binded param query to Tracy

Problem is in Nette\Bridges\DatabaseTracy\ConnectionPanel template which invoke Helpers::dumpSql()

This helper does not support named parameters. Tracy result is:

SELECT * FROM table WHERE id = :something

Expected

SELECT * FROM table WHERE id = 1
@insekticid insekticid changed the title Helpers::dumpSql() should parse named params #77 Jul 15, 2015
@insekticid insekticid changed the title Helpers::dumpSql() should parse named params #78 Jul 15, 2015
@dg dg force-pushed the master branch 3 times, most recently from 6c43c50 to 6690dde Compare November 5, 2015 00:42
@dg dg force-pushed the master branch 4 times, most recently from 0771c2f to 425ad23 Compare April 21, 2016 13:03
@dg dg force-pushed the master branch 2 times, most recently from 59a6661 to b660054 Compare May 30, 2016 14:28
@dg dg force-pushed the master branch 2 times, most recently from 5c87d56 to d9fd67a Compare June 27, 2016 23:11
@dg dg force-pushed the master branch 11 times, most recently from 221f038 to 276f489 Compare October 18, 2016 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant