RFE #470000 - Use parameters for bookmarked queries.
This commit is contained in:
@@ -6,6 +6,12 @@ $Id$
|
||||
$Source$
|
||||
|
||||
2003-03-12 Garvin Hicking <me@supergarv.de>
|
||||
* Documentation.html, db_details.php3, read_dump.php3, tbl_query_box.php3:
|
||||
RFE #470000 - Use parameters for bookmarked queries. This is a bit tricky
|
||||
to do, so please see Documentation.html. I thought it too hard to move the
|
||||
bookmark-box around where you can store the bookmarks, because there are a couples
|
||||
of redirections involved. So the major problem is that your to-be-stored bookmark
|
||||
HAS to yield at least a single result row for you to be able to store that.
|
||||
* tbl_move_copy.php3, tbl_properties_operations.php3: RFE #571838 :
|
||||
Add 'DROP TABLE IF EXISTS' checkbox. Will maintain any existing PMA_* entries
|
||||
for that table.
|
||||
|
@@ -159,7 +159,8 @@ if ($cfg['Bookmark']['db'] && $cfg['Bookmark']['table']) {
|
||||
while (list($key, $value) = each($bookmark_list)) {
|
||||
echo ' <option value="' . $value . '">' . htmlentities($key) . '</option>' . "\n";
|
||||
}
|
||||
echo ' </select>' . "\n";
|
||||
echo ' </select>' . "<br />\n";
|
||||
echo ' ' . $strVar . ' (<a href="./Documentation.html#faqbookmark" target="documentation">' . $strDocu . '</a>): <input type="text" name="bookmark_variable" class="textfield" size="10" />' . "\n";
|
||||
echo ' <input type="radio" name="action_bookmark" value="0" id="radio_bookmark0" checked="checked" style="vertical-align: middle" /><label for="radio_bookmark0">' . $strSubmit . '</label>' . "\n";
|
||||
echo ' <input type="radio" name="action_bookmark" value="1" id="radio_bookmark1" style="vertical-align: middle" /><label for="radio_bookmark1">' . $strBookmarkView . '</label>' . "\n";
|
||||
echo ' <input type="radio" name="action_bookmark" value="2" id="radio_bookmark2" style="vertical-align: middle" /><label for="radio_bookmark2">' . $strDelete . '</label>' . "\n";
|
||||
|
@@ -49,6 +49,9 @@ if (!empty($id_bookmark)) {
|
||||
switch ($action_bookmark) {
|
||||
case 0: // bookmarked query that have to be run
|
||||
$sql_query = PMA_queryBookmarks($db, $cfg['Bookmark'], $id_bookmark);
|
||||
if (isset($bookmark_variable) && !empty($bookmark_variable)) {
|
||||
$sql_query = preg_replace('|/\*(.*)\[VARIABLE\](.*)\*/|imsU', '${1}' . PMA_sqlAddslashes($bookmark_variable) . '${2}', $sql_query);
|
||||
}
|
||||
break;
|
||||
case 1: // bookmarked query that have to be displayed
|
||||
$sql_query = PMA_queryBookmarks($db, $cfg['Bookmark'], $id_bookmark);
|
||||
|
@@ -194,7 +194,8 @@ if (!isset($is_inside_querywindow) ||
|
||||
while (list($key, $value) = each($bookmark_list)) {
|
||||
echo ' <option value="' . $value . '">' . htmlentities($key) . '</option>' . "\n";
|
||||
}
|
||||
echo ' </select>' . "\n";
|
||||
echo ' </select>' . "<br />\n";
|
||||
echo ' ' . $strVar . ' (<a href="./Documentation.html#faqbookmark" target="documentation">' . $strDocu . '</a>): <input type="text" name="bookmark_variable" class="textfield" size="10" />' . "\n";
|
||||
echo ' <input type="radio" name="action_bookmark" value="0" id="radio_bookmark0" checked="checked" style="vertical-align: middle" /><label for="radio_bookmark0">' . $strSubmit . '</label>' . "\n";
|
||||
echo ' <input type="radio" name="action_bookmark" value="1" id="radio_bookmark1" style="vertical-align: middle" /><label for="radio_bookmark1">' . $strBookmarkView . '</label>' . "\n";
|
||||
echo ' <input type="radio" name="action_bookmark" value="2" id="radio_bookmark2" style="vertical-align: middle" /><label for="radio_bookmark2">' . $strDelete . '</label>' . "\n";
|
||||
|
Reference in New Issue
Block a user