Wow, I guess I am just not explaining the problem correctly.
Here's the issue: When you are creating a function or a stored procedure in MySQL (granted I know these are relatively new features for MySQL) you wind up having to use ';' on many lines inside the procedure (obviously, because you have multiple SQL statements, which is the whole point of stored procs).
From the MySQL command line, if you try to do this, it assumes that a ';' means you are done and it should start executing the command. So there is a DELIMITER command that you use to let it know not to do this (by setting the delimiter to something else, like '|', and then ending the whole stored proc statement with that instead of a ';').
If I only needed to do this once, no big deal.
Problem is I have a software application that people are actualy using currently. I am not going to log into each system, and for each database and use the mysql command to do this.
Which is why I have an upgrade.php script that makes any new changes to the database(s). Problem is, there does not seem to be an equivalent to the DELIMITER command (which is only in the MySQL command line program) in the php mysql code.
The only solution I can think of is the use the exec() command to run the mysql command and have my stored proc in a separate file for it to load. This is clunky and there has to be another way to do it.
Its not a permissions issue. Its a SQL parsing issue.