Ability to copy the written query

I would love to be able to copy this info out so i can test in other debuggers

Well it is highly parametrized so not sure if it will work by just running it, you have to supply all input data

Very true, but sometimes when stuff really is just not working and you would like to run the query or insert or update directly in phpMyAdmin or something just to test it out you would be amazed at the time I have spent manually retyping what Wappler has given me to test it out. :slight_smile:

If you run MySQL on your local machine, using Wamp or Mamp etc., you can enable the query log. Then you can copy/paste the actual queries which are executed. It’s great for debugging. You can also set this up directly in Wappler, but I don’t know how to do this on a Mac.

To enable the query log in Windows, add/modify this part of my.ini:
port = 3306
; enables SQL queries to be logged
general_log = on

I expect it’s similar on a Mac.


Thanks, that sounds interesting, unfortunately I hardly ever use a local development environment, but have to admit I have been considering it lately more and more.
I already have MacOsX Server on most of my machines so it has built in capability without WAMP or MAMP etc of enabling local web development environments.
Will let you guys know.

instead we should test it directly in wappler. for example a simple test button and we supply the test variables. and see the result in the console



Enable general query log by the following query in mysql command line

SET GLOBAL general_log = 'ON';

open C:/xampp/mysql/data/mysql.log and check query log

If it fails, open your my.cnf file. For windows its my.ini file and enable it there. Just make sure its in the [mysqld] section

general_log             = 1

Note: In xampp my.ini file can be either found in xampp\mysql or in c:\windows directory

1 Like

There was a version at some stage that DMXZone had where it worked exactly like that, used to click a test button and a window would come up asking to supply the parameters and then it would show the results directly in the window, I have to admit that was really awesome, as you could test your query 100 times and joins etc to see what you were getting. Loved it.

1 Like

That was a really great feature that I used often. Would love to see a feature like that return. Sometimes larger queries require “playing with” to get just right. Being able to make a change in the query, then click a test button and get immediate results was very nice.

I agree, that was an incredibly useful feature and would love to see it in Wappler

it sure is - but this is actually useful to be able to copy the query.
example use case would be to run directly on the server for debugging purposes.

please consider.

1 Like

The SQL query shown in the Query Builder is not the actual query used on the server, it is only there as a preview. The query is using the ANSI SQL standard, your database could require other escaping or functions could be named different. mySQL uses the backtick ` for escaping while MS SQL Server uses [] and in the ANSI SQL standard it is ". The actual used query is generated on the server.

1 Like

Does anyone else have a suitable answer to this one? I’m writing some fairly complex (for me) SQL statements and sometimes they don’t work and I’d like to quickly see what data is actually being output - I can’t do this in Wappler, and nor can I copy/paste the SQL into my chosen editor (HeidiSQL).

Would it be possible to make this area in the database query builder one we can copy from?


This was implemented in Wappler 5.1.5