MySql returning multiple rows from stored procedure / function

Posted by pistacchio on Stack Overflow See other posts from Stack Overflow or by pistacchio
Published on 2009-06-30T06:26:23Z Indexed on 2010/06/08 20:12 UTC
Read the original article Hit count: 170

Filed under:
|

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.

© Stack Overflow or respective owner

Related posts about mysql

Related posts about stored-procedures