Editor SSP: Viewing the SQL used to query the database
Editor SSP: Viewing the SQL used to query the database
sirchunk
Posts: 9Questions: 2Answers: 0
Hi,
Before trialing Editor, I was using just DataTables and the SSP class
In there I could save the SQL query to a var before passing it to sql_exec()
then add it to the output array so I can display it in the console using:
initComplete: function(settings, json) {
console.log(settings);
console.log(json);
}
Can something similar be done with Editor to view the full SQL query used when querying the database?
This discussion has been closed.
Answers
Answered my own question.
using
debug( true )
does what I want and outputs it to the console, albeit it doesn't work.I have to manually change
private $_debug = false;
in Editor.php totrue
for it to work, which says something else isn't right somewhere as the SQL query returned works when I manually add it to psqlWhat is the error message you are getting? Can you show me the JSON return from the server when you have debugging enabled?
Thanks,
Allan
Hi Allan, a bit embarrassing really and a schoolboy error.
I created a new table I was querying against and forgot to add the permission needed for the user setup in the PDO object to access the table.