plugin:datatables
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
plugin:datatables [2020-11-18 12:55] – [Suggestion: autolink] possible answer for autolink... robl | plugin:datatables [2020-11-18 13:04] – [Suggestion: autolink] robl | ||
---|---|---|---|
Line 178: | Line 178: | ||
One possible answer to the above is to modify the SQL query so it outputs a link. | One possible answer to the above is to modify the SQL query so it outputs a link. | ||
- | * To make a link clickable (where the thing returned from sql is already a URL, in field " | + | * To make a URL clickable (where the thing returned from sql is already a URL, in field "'' |
< | < | ||
<sql> | <sql> | ||
- | CONCAT('< | + | SELECT |
+ | CONCAT('< | ||
+ | ... | ||
+ | FROM | ||
+ | table | ||
... | ... | ||
</ | </ | ||
</ | </ | ||
- | For example, if you wanted to make " | + | To make "'' |
- | * To put the id at the end of the link: '' | + | * To put the id at the end of the link, e.g.: '' |
< | < | ||
<sql> | <sql> | ||
- | CONCAT('< | + | SELECT |
+ | CONCAT('< | ||
+ | ... | ||
+ | FROM | ||
+ | table | ||
... | ... | ||
</ | </ | ||
</ | </ | ||
- | * To insert the id at somewhere in the link: '' | + | * To insert the field '' |
< | < | ||
Line 204: | Line 212: | ||
SELECT | SELECT | ||
CONCAT('< | CONCAT('< | ||
+ | ... | ||
+ | FROM | ||
+ | table | ||
... | ... | ||
</ | </ | ||
</ | </ | ||
+ | |||
+ | And other variations on this, for example if you needed multiple fields to build the URL, that's possible too with '' | ||
Obviously this hack is only useful if you're using datatables with the sql plugin. It also means you can't do "'' | Obviously this hack is only useful if you're using datatables with the sql plugin. It also means you can't do "'' |
plugin/datatables.txt · Last modified: 2024-04-21 09:58 by 2001:1c04:2a92:5f00:4a0f:68f2:3f0c:20c6