MySql returning multiple rows from stored procedure / function
- by pistacchio
Hi,
I need to make a stored procedure or function that returns a set of rows. I've noted that in a stored procedure i can SELECT * FROM table with success. If i fetch rows in a loop and SELECT something, something_other FROM table once per loop execution, I only get one single result.
What I need to do is looping, doing some calculations and returning a rowset. What's the best way to do this? A temporary table? Stored functions?
Any help appreciated.