Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
It would be nice if I could load and save the Query By
Example Pages on the "Query" page.
I know you can load and save SQL queries, it shouldn't
be too hard to load and save a QBE page.
I'm thinking about implementing this feature.
Would it be possible to store the information (in JSON) in phpmyadmin.pma_userconfig or is it better to create a new table ?
I think it's better to create a new table.
Where should be the SQL to create the table please ? examples/create_tables.sql and examples/create_tables_drizzle.sql ?
And after, I need to add a line in config.inc.php, like other lines commented, that's it ?
I'll try to do a mock-up, to validate my idea.
Yes, these .sql files.
No, we have no config.inc.php in the codebase; use config.sample.inc.php.
Here is a mock-up while selecting a saved search.
And here a mock-up while saving a new search. (A button to save is missing.)
I think about having a saved search for a user, a database and a table.
The data could be stored like in pma_recent (one line by user) or like in pma_table_uiprefs (easier to get the saved searches of a table).
The mock-ups look fine. By the way, this feature request is about saving multi-table QBE (open a database, then click on Query); it's not about saving single-table searches.
Ok, I didn't catch this…
Is there any documentation for this page please ? I've never used it before, and it seems that I didn't catch the aim of all the fields…
Apart from the book "Mastering phpMyAdmin" I don't think that there is any doc. Do you have a specific question?
Yes. What ever the value I set in the last field (the one with "allo"), there is no impact on the query…
What should be in this field please ?
For this string "allo" to have an effect, tick the checkbox "Ins" which is on the left part of this criteria line, then click to update the query.
It seems that the only things that happened are that I have a new line (like the one with "allo"), but there were no effect on the query…
Could you please give me an example where these fields have an impact on the query ?
You found a bug. I tested on QA_3_5: writing a criteria on the second criteria link makes it appear in the generated query when clicking to update the query (you should not mark Ins, sorry). But starting with QA_4_0, the second criteria line is not used.
Ok, so I could work on this feature.
The bug would be another subject.
Thanks for all your time.
Here is my pull request for this feature: https://github.com/phpmyadmin/phpmyadmin/pull/956