creating a function in mysql

2007-04-13 Thread Andrey Dmitriev
All, I've been trying to create a function that will generate URLs so that I wouldn't have to wrote ugly SQL all the time. After no success, I've determined that I don't seem to be able to create functions at all. I am relatively new to mysql development (or management), so any advice is

Re: creating a function in mysql

2007-04-13 Thread Peter Brawley
I've determined that I don't seem to be able to create functions at all. Declare a delimiter, and lose the quote around the function name, eg DROP FUNCTION IF EXISTS weighted_average; DELIMITER | CREATE FUNCTION weighted_average(n1 INT, n2 INT, n3 INT, n4 INT) RETURNS int(11) DETERMINISTIC

RE: creating a function in mysql

2007-04-13 Thread Andrey Dmitriev
PROTECTED] Sent: Friday, April 13, 2007 5:37 PM To: Andrey Dmitriev Cc: [EMAIL PROTECTED] Subject: Re: creating a function in mysql I've determined that I don't seem to be able to create functions at all. Declare a delimiter, and lose the quote around the function name, eg DROP FUNCTION IF EXISTS

Re: creating a function in mysql

2007-04-13 Thread Peter Brawley
] Subject: Re: creating a function in mysql I've determined that I don't seem to be able to create functions at all. Declare a delimiter, and lose the quote around the function name, eg DROP FUNCTION IF EXISTS weighted_average; DELIMITER | CREATE FUNCTION weighted_average(n1 INT, n2 INT, n3

Re: creating a function in mysql

2007-04-13 Thread Baron Schwartz
Andrey Dmitriev wrote: Thanks, that works.. Next question Does MySql support using it's own functions within this code? E.g. I tried set str = select concat (str,'hello'); set str = concat (str, 'hello'); And it didn't seem to like either. Eliminate the spaces between the function