Is there any chance to get SQL statement executed?
Is there any chance to get SQL statement executed?
alpaltunel
Posts: 14Questions: 3Answers: 0
in General
Is this SQL statement query generated by editor is saved anywhere in classes? is there any way to display it for debuging purposes?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi alpatunel,
Your inquiry is very vague, but to clear some things up. Editor does not generate SQL statements by itself, the information that is changed needs to be processed on the server.
Are you referring to the .NET Library that comes with the commercial version of Editor?
It would really help if you could be more specific about what you are referring to, or it is perhaps me that lacks knowledge =)
Hope this helps,
Dear Ashbjorn
I am a registered user and have a paid licence. I am using php library with datatables editor.
I used the editor in my project and got some issues. for debugging purposes I need to see the sql query (statement) which is created by datatables editor's php libraries.
Is there any way to display this value to the screen (temporarily of course) like:
$editor->query->show() ??? etc
more clear way:
what is the sql query when I run this example.
hope this is clear
regards
Hi,
Yes indeed it is possible to see the query that the Editor libraries construct - although you'll need to dump it to a file (you could echo it, but that will result in JSON errors, which might be acceptable for you while debugging...).
What to do is look in the
Database/Drivers/Mysql/Query.php
file (assuming you are using MySQL - the others have a similar file) and then look at the_prepare
method. Near the bottom you will find afile_put_contents()
function call that has been commented out. Comment it back in, or add whatever debugging you want to get the information from the$sql
parameter and that will show the generated query.Its a bit messy at the moment I know - in future I'll add a debugging option that will give this information more easily.
Regards,
Allan
Your are great man :)
I have no problem with echoing through page because I will see it and then disable it.
thank you