Re: Stored procedure vs. function
There is one main difference between functions and procedures.
A function must return a value and it can be only a single value. Any number of parameters can be passed in but only 1 value can be passed out. This value comming out must be done via the RETURN.
A Procedure doesn't have to return anything. But it can accept any number of parameters in and also any number of parameters out. There is no RETURN in a procedure.
At the present time functions are limited in the SQL they can use but that should be temporary. Also you can't use a procedure in an SQL statement because it doesn't return values in the same way.
To address the second part of the question, no it doesn't matter if you convert the procedure to a function, but the behaviour of the procedure needs to be such that it only returns a single value. If that is the case it would proberly be desireable to make it into a function.
Have a look at the following page which expands (only slightly) on the above.
http://mysql.gilfster.com/tutorials/funcorprocs.php
Andrew Gilfrin
------------------
http://gilfster.blogspot.com
My MySQL related Blog
http://www.mysqldevelopment.com
MySQL Stored Procedure,Trigger, View.... (Just about most things these days) Information