Editing
Template:Query/doc
(section)
Jump to navigation
Jump to search
β οΈ
Warning:
You are not logged in.
Your IP address will be publicly visible
if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username instead of your IP, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Usage == Basic usage: <code>{{query|table=''table''|get=''column to output data from''|from=''name or ID''}}</code> or <code>{{query|table=''table''|get=''column to output data from''|filter_col=''column to filter''|filter_col_val=''value to filter by''}}</code> * <code>|table=</code> - The Cargo table to search in. Go to [[Special:CargoTables]] to see all tables. * <code>|get=</code> - The table column from which data should be retrieved and output. * <code>|from=</code> - If this parameter is a valid Discord ID (e.g. <code>501310750074077215</code>), then data will only be taken from table rows whose "id" column matches this parameter. If this parameter is ''not'' a valid Discord ID, then the "name" column will be searched instead. If these columns are not present in the table, or you just want to filter by a different column, then use these parameters instead: ** <code>|filter_col=</code> - The column to search. If using this parameter, you must also specify the <code>filter_col_val</code> parameter. ** <code>|filter_col_val=</code> - The value to search for in the column specified in <code>filter_col</code>. Not all parameters were listed here. For a detailed description of all parameters, see the TemplateData section below. === Examples === If you want to output the owner of [[Whenthe]], you could use either <code><nowiki>{{query|table=discord_servers|get=owner|from=Whenthe}}</nowiki></code> or <code><nowiki>{{query|table=discord_servers|get=owner|from=501310750074077215}}</nowiki></code>, which would output: {{query|table=discord_servers|get=owner|from=Whenthe}} If you wanted a list of active servers, you could do something like <code><nowiki>{{query|table=discord_servers|get=name|filter_col=status|filter_col_val=active|limit=25}}</nowiki></code>, which would output: {{query|table=discord_servers|get=name|filter_col=status|filter_col_val=active|limit=25}}
Summary:
Please note that all contributions to Irony Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see
Irony Wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
English
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Template
Discussion
English
Views
Read
Edit source
View history
More
Purge cache
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information
Page values