Prev | Current Page 183 | Next

Marc Delisle

"Mastering phpMyAdmin 2.11 for Effective MySQL Management"

This default type of history is
temporary, because $cfg['QueryHistoryDB'] is set to FALSE by default.
Database-Based SQL History (Permanent)
Because we installed the linked-tables infrastructure (see Chapter 11), a
more powerful history mechanism is available and is triggered by setting
$cfg['QueryHistoryDB'] to TRUE.
After we try some queries from one of the query boxes, a history is built; this history
is visible only from the query window:
We see (in the reverse order) the last successful queries, and the database on which
they were made. Only the queries typed from the query box are kept in this history,
not queries generated by phpMyAdmin itself (for example, by clicking on Browse).
They are clickable for immediate execution, and the Edit icon is available to insert a
recorded query into the query box for editing.
The number of queries that will be kept is controlled by $cfg['QueryHistoryMax'],
which is set to 25 by default. This limit is not kept for performance reasons but as
a practical limit, so as to achieve a visually unencumbered view. Extra queries are
eliminated at login time in a process traditionally called garbage collection. The
queries are stored in the table configured in $cfg['Servers'][$i]['history'].
Entering SQL Commands
[ 200 ]
Editing Queries in the Query Window
On the results page of a successful query, a header containing the executed
query appears:
Clicking Edit opens the Query window's SQL tab, with this query ready to be
modified.


Pages:
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195