Reputation: 52523
I'm relatively new to MySQL stored procs, so I was hoping someone could help me out here. I want to call my stored proc (maybe pass in one IN
param) and have it do the following:
SELECT
some dataINSERT
s in other tables based on the data it finds.My problem is that I don't know how to store the SELECT
data set and iterate the records. I know how to declare
and set
stuff like int
and text
, but not full data sets. How do I do this?
Thanks
Upvotes: 14
Views: 21455
Reputation: 30111
Look into MySql Cursors
http://dev.mysql.com/doc/refman/5.0/en/cursors.html
Upvotes: 10