gjking Posted May 28, 2006 Share Posted May 28, 2006 Hellllo there,I want to create stored functions. I checked out the MySQL manual how to do this. But in the process of doing this I wanted to get a list with info of all these stored functions The manual says this can be done with "SHOW FUNCTION STATUS"However this does not work...I tried it by executing this query from 3 places:PHPMyAdmindirect in the command linefrom a php script which I've written myselfI use MySQL version 4.1.10a-ntI also have problems creating a stored function...I tried the following example (from the command line):[code]delimiter ||CREATE FUNCTION WEIGHTED_AVERAGE (n1 INT, n2 INT, n3 INT, n4 INT) RETURNS INT DETERMINISTIC BEGIN DECLARE avg INT; SET avg = (n1+n2+n3*2+n4*4)/8; RETURN avg; END||[/code]But I get the following error:[code]ERROR 1064 (42000): You have an error in your SQL syntax; check the manual thatcorresponds to your MySQL server version for the right syntax to use near '(n1 INT, n2 INT, n3 INT, n4 INT) RETURNS INT DETERMINISTIC BEGIN D' at line 1[/code]Hope someone can help me out....Best wishes,GJ Quote Link to comment https://forums.phpfreaks.com/topic/10637-show-function-status/ Share on other sites More sharing options...
fenway Posted May 28, 2006 Share Posted May 28, 2006 Support for SPs was only added in MySQL 5. Quote Link to comment https://forums.phpfreaks.com/topic/10637-show-function-status/#findComment-39762 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.