Jump to content

Debug mode tools PDO query suggestions


adrian
 Share

Recommended Posts

Hey Ryan,

A couple of quick suggestions for the debug mode tools PDO queries section. 

First one should be simple - force queries to wrap so they aren't truncated. I know they are still there and can be viewed in the page source, but would make life easier still. Along with break-word etc, I actually quite like how it looks with white-space: pre; as well, although it does make for a long page :)

The other thing might be more difficult - any chance you could decode the bindValue of the variables so we can see what is actually being queried. I haven't looked to see how/when this debug table is built, so maybe this isn't possible, but it sure would be helpful!

Link to comment
Share on other sites

  • 3 weeks later...
First one should be simple - force queries to wrap so they aren't truncated. 

Not sure I understand. Queries wrap for me at least?

post-2-0-22389700-1396697733_thumb.png

The other thing might be more difficult - any chance you could decode the bindValue of the variables so we can see what is actually being queried. I haven't looked to see how/when this debug table is built, so maybe this isn't possible, but it sure would be helpful!

I don't think there is (unless getting into some internals of PDO). The prepare() method where queries are logged comes before variables are bound. Plus, variables are bound internally via PDO statement objects and not via ProcessWire. 

Link to comment
Share on other sites

Hey Ryan - I actually get this is some cases and not others:

post-985-0-44916300-1396711972_thumb.png

Not sure why - not a big deal.

I thought as much - just thought maybe you could store an array matching values to the variables and replace them on display. Again, no big deal - much more important things to do :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...