Posted by hass on August 30, 2009 at 6:33pm
Jump to:
| Project: | Devel |
| Version: | 7.x-1.x-dev |
| Component: | devel |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Looking into the query list in footer table only shows the SQL statements with placeholders. Any chance to also see the values and maybe the resulting SQL query with all values?
Below statement is not very helpful if you need to know what's inside :db_condition_placeholder_1.
DELETE FROM cache_update WHERE (cid = :db_condition_placeholder_1)
Comments
#1
I tried to get this and it was a real PITA with DBTNG. Hopefully someone is willing to work on this. Sorely needed, I agree.
#2
Subscribing to this. It's actually useful the way it is now for some purposes, since it'll show the same query run with different values as duplicates. But overall it'd be nice to have the values.
#3
Since we are using *emulated* prepared statement, it should be easy to do this but PDO provides now known way to get the raw SQL. SO we'll need some enterprising person add a feature for on-demand replacement of placeholders into the SQL with some strategy for quoting values. For a UI, I'd just like a 'values' link at the end of each query. Clicking the link replaces the placeholders in the cell you clicked.
#4
It'd be fairly trivial to just strtr the values inside with everything quoted. Would work for MySQL.
<?phpfunction add_quotes($x) { return "'$x'"; }
print strtr($query, array_map('add_quotes', $arguments));
?>
#5
Any clue how I can do #4 in javascript?
#6
google strtr javascript
#7
cvs commit -m "#563842 Major enhancement to SQL query log. There are now 3 variants of a query. Placeholders, arguments, and EXPLAIN. You toggle among them using the new AJAX links beside each query. Needs some CSS help, and a little 'copy to clipboard' feature"#8
Automatically closed -- issue fixed for 2 weeks with no activity.