Jamorabon / phpliteadmin

Automatically exported from code.google.com/p/phpliteadmin
0 stars 0 forks source link

SQL Tab Query History #251

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It would be convenient to save a log of the user's previously-run SQL queries 
and display it directly on the SQL tab. Then, if the user needs to re-run a 
query that he knows he ran before, he can simply find it in the list and click 
on it, and it will auto-fill the textarea.

This history of SQL queries should probably just be saved in the session. 

Original issue reported on code.google.com by daneirac...@gmail.com on 5 May 2014 at 12:39

GoogleCodeExporter commented 9 years ago

Original comment by daneirac...@gmail.com on 7 May 2014 at 7:40

GoogleCodeExporter commented 9 years ago
Thanks for implementing this.

Some remarks:
- please use tabs for indention, not spaces. Please always check before 
committing.
- please introduce a new language text for GUI texts like "Recent Queries".
This means: add it to the English language file and to all others with the 
English text and a "#todo translate" comment.
While developing, always at least add a todo-comment in the php source when 
adding a new text so we don't forget it.
- don't echo $value without escaping special characters. It might very likely 
contain < or stuff like this. Use htmlencode(). Then you probably cannot use 
innerHTML to access it. Maybe make PHP echo the stuff in a Javascript-array or 
something.
- you are incrementing but not using $i 
- I guess <a> without an href is invalid XHTML.
- Just an idea: if the array is getting large, searching every time might be 
slow. An idea would be hashing the lowercase thing and using the hash a 
array-key.

Original comment by crazy4ch...@gmail.com on 7 May 2014 at 9:33

GoogleCodeExporter commented 9 years ago
Left todos fixed with the following commits:
20e79da5b484
7bf91a4365bc

Original comment by crazy4ch...@gmail.com on 13 May 2014 at 7:09