Copy SQL output from Query Builder

I find that sometimes I need to convert a Database Query to a Custom Query and it would be very useful to be able to copy the SQL output so that I can paste it into a new custom query and work on it. At the moment I have to manually type it out.

I agree with you that it can be very useful for a whole number of different reasons. How I currently get around this issue is by selecting the “Server Action” and clicking “Open in Editor”.

image

I then scroll down to find the required query and select that query. I copy it and paste in to MS Word where I have a macro that re-formats the query into something I can either paste into phpMyAdmin, paste into “Database Custom Query” or to keep in some sort or tutorial or reference for myself.

2 Likes

I think @UKRiggers makes a good suggestion. Also, in some cases, using Wappler’s Debug option in query properties may be helpful (but doesn’t work with paged queries).

It is possible to get the actual queries, exactly as they’re executed - if you have access to the query log (as discussed here and here). I find this invaluable for debugging queries etc but obviously not much use if you don’t have access to the logs.

This has been implemented in Wappler 5.1.5

2 Likes