Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Urlencode/urldecode As MySQL Stored Functions

DZone's Guide to

Urlencode/urldecode As MySQL Stored Functions

· Database Zone ·
Free Resource

Built by the engineers behind Netezza and the technology behind Amazon Redshift, AnzoGraph is a native, Massively Parallel Processing (MPP) distributed Graph OLAP (GOLAP) database that executes queries more than 100x faster than other vendors.  



DELIMITER ;

DROP FUNCTION IF EXISTS multiurldecode;

DELIMITER |

CREATE FUNCTION multiurldecode (s VARCHAR(4096)) RETURNS VARCHAR(4096)
DETERMINISTIC 
CONTAINS SQL 
BEGIN
       DECLARE pr VARCHAR(4096) DEFAULT '';
       IF ISNULL(s) THEN
          RETURN NULL;
       END IF;       
       REPEAT
          SET pr = s;
          SELECT urldecode(s) INTO s;
       UNTIL pr = s END REPEAT;
       RETURN s;
END;

|

DELIMITER ;


Download AnzoGraph now and find out for yourself why it is acknowledged as the most complete all-in-one data warehouse for BI style and graph analytics.  

Topics:
mysql

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}