Actually, better use that link (above). Blogger is messing with the code below.
Usage:
SELECT HTML_UnEncode(firstname),HTML_UnEncode(lastname) FROM users;
DELIMITER $$ DROP FUNCTION IF EXISTS `sourcedatabase`.`HTML_UnEncode`$$ CREATE DEFINER=`user`@`localhost` FUNCTION `HTML_UnEncode`(x VARCHAR(255)) RETURNS varchar(255) CHARSET latin1 BEGIN DECLARE TextString VARCHAR(255) ; SET TextString = x ; #quotation mark IF INSTR( x , '"' ) THEN SET TextString = REPLACE(TextString, '"','"') ; END IF ; #apostrophe IF INSTR( x , ''' ) THEN SET TextString = REPLACE(TextString, ''','"') ; END IF ; #ampersand IF INSTR( x , '&' ) THEN SET TextString = REPLACE(TextString, '&','&') ; END IF ; #less-than IF INSTR( x , '<' ) THEN SET TextString = REPLACE(TextString, '<','<') ; END IF ; #greater-than IF INSTR( x , '>' ) THEN SET TextString = REPLACE(TextString, '>','>') ; END IF ; #non-breaking space IF INSTR( x , ' ' ) THEN SET TextString = REPLACE(TextString, ' ',' ') ; END IF ; RETURN TextString ; END$$ DELIMITER ;
Hello ,
ReplyDeleteI am Getting following Error..
Can you please help..
Thanks in advance
Error
SQL query:
DELIMITER $$ DROP FUNCTION IF EXISTS `sourcedatabase`.`HTML_UnEncode` $$ CREATE DEFINER = `user`@`localhost` FUNCTION `HTML_UnEncode` (
x VARCHAR( 255 )
) RETURNS varchar( 255 ) CHARSET latin1 BEGIN DECLARE TextString VARCHAR( 255 ) ;
MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER $$
DROP FUNCTION IF EXISTS `sourcedatabase`.`HTML_UnEncode`$$
CREA' at line 1
30
ReplyDeletedown vote
accepted
There are two ways to fix this:
Execute the following in the MySQL console:
SET GLOBAL log_bin_trust_function_creators = 1;
Add the following to the mysql.ini configuration file:
log_bin_trust_function_creators = 1
and replace sourcedatabase with your db name and user with your username
#1582 - Incorrect parameter count in the call to native function 'INSTR'
ReplyDeleteTo link to a website from a picture in an email or forum, you should be able to use the editing buttons in the same way you link text. css forums
ReplyDeleteI saw a lot of website but I believe this one has got something special in it in it web design new york
ReplyDeleteHey there! Nice stuff, please keep me posted when you post something like this! web design new york
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteTaylor Lautner Workout Routine… By the way you might want to check out this cool site I found…… san fran design firms
ReplyDeleteI’ll right away grab your rss feed as I can not find your e-mail subscription link or e-newsletter service. Do you have any? Kindly let me know so that I could subscribe. Thanks. web design la
ReplyDeleteExtensively, now this article is truly the best using this crucial subject matter. My spouse and i harmonise collectively findings and tend to thirstily expect to be your primary one way upgrades. Explaining kudos won’t only always be an adequate amount of, on your wonderful purity inside your crafting articles. For certain i will easily catch an individual’s feed maintain up to date of the the latest. Enlightening job and far becoming successful for your small business trades! Please justification the actual deficient Everyday terms currently far from a few initial language. la web design
ReplyDeleteGood day” i am doing research right now and your blog really helped me” web design la
ReplyDeleteThese kinds of Search marketing boxes normally realistic, healthy and balanced as a result receive just about every customer service necessary for some product. Link Building Services converting websites
ReplyDeleteI got what you mean , regards for posting .Woh I am pleased to find this website through google. top web design agencies
ReplyDelete