Thanks Ric,   No PHP code. All MySQL. Was originally using SQLyog as interface, but went to the CLI to try and isolate the problem. Sample code -     Creating Functions, #################################################################### # Function lineTotal() # # Takes two parameters, one integer, one decimal # and returns the product of the two numbers rounded to # two decimal places. #################################################################### DELIMITER $$ DROP FUNCTION IF EXISTS lineTotal$$ CREATE FUNCTION lineTotal(quantity INT,price DECIMAL(8,2))     RETURNS DECIMAL(10,2) BEGIN 	RETURN ROUND((quantity * price),2); END$$   DELIMITER ; #################################################################### # Function shorten() # # Takes two parameters, one string, one integer # and returns part of the string to a maximum  # of 15 characters places. #################################################################### DELIMITER $$ DROP FUNCTION IF EXISTS shorten$$ CREATE FUNCTION shorten(s VARCHAR(255),n INT)  	RETURNS VARCHAR(255) BEGIN 	IF ISNULL(s) THEN 		RETURN ''; 	ELSEIF n < 15 THEN 		RETURN LEFT(s,n); 	ELSE 		IF CHAR_LENGTH(s) <= n THEN 			RETURN s; 		ELSE 			RETURN CONCAT(LEFT(s, n-10),' ... ', RIGHT(s,5)); 		END IF; 	END IF; END$$   DELIMITER ;   To test the functions,   SELECT shorten('abcdefghijklmnopqrstuvwxyz', 16); SELECT lineTotal(3,2.3);   I have now had a similar error with triggers too.   Much appreciative of any advice you can give   Andre