Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

insekticid
Copy link
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 Helpers::dumpSql() should parse named params #78 Jul 15, 2015
@insekticid insekticid changed the title Helpers::dumpSql() should parse named params #78 Helpers::dumpSql() should parse named params 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant