extract_url_parameter
Description
Syntax:
VARCHAR extract_url_parameter(VARCHAR url, VARCHAR name)
This function returns the value of the parameter with the name name
in url
(if there exists such a parameter); otherwise, it will return an empty string. If there are multiple parameters with the name name
, it will return the first one.
This function works assuming that the parameter name is encoded in the URL exactly as it was in the passed parameter.
Example
mysql> SELECT extract_url_parameter ("http://doris.apache.org?k1=aa&k2=bb&test=cc#999", "k2");
+--------------------------------------------------------------------------------+
| extract_url_parameter('http://doris.apache.org?k1=aa&k2=bb&test=cc#999', 'k2') |
+--------------------------------------------------------------------------------+
| bb |
+--------------------------------------------------------------------------------+
Keywords
EXTRACT URL PARAMETER