forgot to commit.
This commit is contained in:
@@ -2988,6 +2988,46 @@ To create a new, empty mimetype please see libraries/transformations/template_ge
|
|||||||
<br />
|
<br />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<a name="faqbookmark"></a>
|
||||||
|
<h4>
|
||||||
|
[6.17] Bookmarks: Where can I store bookmarks? Why can't I see any bookmarks below the query box?
|
||||||
|
What is this variable for?
|
||||||
|
</h4>
|
||||||
|
<p>
|
||||||
|
Any query you have executed can be stored as a bookmark on the page where the results are displayed.
|
||||||
|
You will find a button labeled 'Bookmark this query' just at the end of the page.<br />
|
||||||
|
As soon as you have stored a bookmark, it is related to the database you run the query on. You can
|
||||||
|
now access a bookmark dropdown on each page, the query box appears on for that database.<br />
|
||||||
|
<br />
|
||||||
|
Since phpMyAdmin 2.4.1 you are also able to store variables for the bookmarks. Just use the string
|
||||||
|
<b>/*[VARIABLE]*/</b> anywhere in your query. Everything which is put into the <i>value</i> input
|
||||||
|
box on the query box page will replace the string "/*[VARIABLE]*/" in your stored query.
|
||||||
|
Just be aware of that you HAVE to create a valid query, otherwise your query won't be even able to be
|
||||||
|
stored in the database.<br />
|
||||||
|
Also remember, that everything else inside the <b>/*[VARIABLE]*/</b> string for your query will remain
|
||||||
|
the way it is, but will be stripped of the /**/ chars. So you can use:<br /><br />
|
||||||
|
<code>/*, [VARIABLE] AS myname */</code><br /><br />
|
||||||
|
which will be expanded to<br /><br />
|
||||||
|
<code>, VARIABLE as myname</code><br /><br />
|
||||||
|
in your query, where VARIABLE is the string you entered in the input box. If an empty string is
|
||||||
|
provided, no replacements are made.<br />
|
||||||
|
<br />
|
||||||
|
A more complex example. Say you have stored this query:<br /><br />
|
||||||
|
<code>SELECT Name, Address FROM addresses WHERE 1 /* AND Name LIKE '%[VARIABLE]%' */</code><br /><br />
|
||||||
|
Say, you now enter "phpMyAdmin" as the variable for the stored query, the full query will
|
||||||
|
be:<br /><br />
|
||||||
|
<code>SELECT Name, Address FROM addresses WHERE 1 AND Name LIKE '%phpMyAdmin%'</code>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
You can use multiple occurences of <b>/*[VARIABLE]*/</b> in a single query.<br />
|
||||||
|
<b>NOTE THE ABSENCE OF SPACES</b> inside the "/**/" construct. Any spaces inserted there
|
||||||
|
will be later also inserted as spaces in your query and may lead to unexpected results especially when
|
||||||
|
using the variable expansion inside of a "LIKE ''" expression.<br />
|
||||||
|
Your initial query which is going to be stored as a bookmark has to yield at least one result row so
|
||||||
|
you can store the bookmark. You may have that to work around using well positioned "/**/"
|
||||||
|
comments.
|
||||||
|
</p>
|
||||||
|
|
||||||
<a name="faqproject"></a><br />
|
<a name="faqproject"></a><br />
|
||||||
<h3>[7. phpMyAdmin project]</h3>
|
<h3>[7. phpMyAdmin project]</h3>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user