PDO - Generated SQL?

16 views
Skip to first unread message

ashore

unread,
Nov 7, 2016, 5:51:18 PM11/7/16
to Professional PHP Developers
All, I'm finally getting into using PDO after a long time writing conventional non-PDO MySQL stuff.  One thing that's always been a big debug help for me is to try the sql string in PHPMyAdmin.

But I don't see a way to get at the sql emitted/generated by a PDO expression.

How can I do so?

Robert Gonzalez

unread,
Nov 7, 2016, 7:03:18 PM11/7/16
to professional-php
Read this page and see if it will help you.


--
This group is managed by the web application development team at www.360psg.com
---
You received this message because you are subscribed to the Google Groups "Professional PHP Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to professional-php+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/professional-php.
To view this discussion on the web visit https://groups.google.com/d/msgid/professional-php/03e4e5d1-5c8f-4387-a73e-a06da0ae1ccf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Robert Gonzalez

ashore

unread,
Nov 8, 2016, 7:49:39 AM11/8/16
to Professional PHP Developers
Sure does.  Thanks again, Robert.  AS

ashore

unread,
Nov 11, 2016, 4:09:48 PM11/11/16
to Professional PHP Developers
I found another. 

    Execute SET GLOBAL log_output = 'TABLE';
    Execute SET GLOBAL general_log = 'ON';
    Then take a look at the table mysql.general_log



Reply all
Reply to author
Forward
0 new messages