I have been trying to create a function in mysql (5.x). I had used Toad for MySQL to create it, and it works just fine...
So, I go to create my database update script. I put the "CREATE FUNCTION ...." SQL code into a query in my PHP code. No workie. So I tried pasting the SQL into phpMyAdmin. No workie. Come to find out you can do it using the mysql command line client and using the DELIMITER command. OK this makes sense, since the SQL for the function has ';' in it, you have to change the delimiter to something else temporarily.
But DELIMITER doesnt work in a query from PHP, because its not an SQL command.
So how the hell do I do this? I need this function created from my update script in php (and soon, I will probably be adding lots of stored procedures which will have the same problem) because I'm not going to use the mysql command on each database...
I've been googling and pulling my hair out trying to figure out what the hell I need to do to make this work.