SQL Tab Query History

Issue #251 resolved
Dane Iracleous created an issue

Originally reported on Google Code with ID 251

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. 

Reported by diracleo on 2014-05-05 12:39:16

Comments (3)

  1. Christopher Kramer
    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.
    

    Reported by crazy4chrissi on 2014-05-07 09:33:06 - Status changed: Started

  2. Christopher Kramer
    Left todos fixed with the following commits:
    20e79da5b484
    7bf91a4365bc
    

    Reported by crazy4chrissi on 2014-05-13 19:09:19 - Status changed: Fixed

  3. Log in to comment