Anstice
January 8th, 2013, 12:30 AM
Hi guys, the following code makes a call to a
preg_replace function that I cant seem to find on the db.
CREATE DEFINER=`root`@`localhost` FUNCTION `makehash`(description text, raw_location text, title text) RETURNS varchar(32) CHARSET utf8
NO SQL
DETERMINISTIC
begin
declare data longtext;
declare hash varchar(32);
set data = ifnull(description, '');
set hash = null;
if length(data) > 64 then
set data = lower(concat(data, ifnull(raw_location, ''), ifnull(title, '')));
set hash = md5(preg_replace('/[^a-z]/', '', data));
end if;
return hash;
end
Basically, I have two dbs and am moving from one to the other. I almost there apart from this last thing prevents things from running.
I have run
show procedure status and
show function status but can't see this anywhere.
Are there another mysql constructs like functions and procedures that can be called like this that I may have missed?
preg_replace function that I cant seem to find on the db.
CREATE DEFINER=`root`@`localhost` FUNCTION `makehash`(description text, raw_location text, title text) RETURNS varchar(32) CHARSET utf8
NO SQL
DETERMINISTIC
begin
declare data longtext;
declare hash varchar(32);
set data = ifnull(description, '');
set hash = null;
if length(data) > 64 then
set data = lower(concat(data, ifnull(raw_location, ''), ifnull(title, '')));
set hash = md5(preg_replace('/[^a-z]/', '', data));
end if;
return hash;
end
Basically, I have two dbs and am moving from one to the other. I almost there apart from this last thing prevents things from running.
I have run
show procedure status and
show function status but can't see this anywhere.
Are there another mysql constructs like functions and procedures that can be called like this that I may have missed?