Forum Moderators: coopster

Message Too Old, No Replies

MySQL stored procedure

         

jojy

12:59 am on Aug 15, 2008 (gmt 0)

10+ Year Member



Hi,
I know this question should not be posted here because this is not database forum but i am wondering if anyone can help me here :)

I have a php registration page which involves insertion in many tables to complete a registration process. Here are the steps.

User register on website and a record insert into mysql users table.

By using php i am getting the mysql insert id and then I insert 5 records in different 4 tables by using this ID as foreign key.

I want to do this in one single sql command by using php and stored procedure. I have never done this before. Anyone can just tell me few things. How do I get insert id in stored procedure and how do I execute insert command.

Thanks

tatorface

8:38 pm on Aug 15, 2008 (gmt 0)

10+ Year Member



Waaaay to much to write here, but this link should get you started in the right direction:
[databasedesign-resource.com...]

It shows you a program you can download to create and edit SPs, how to execute them using command line, the program itself or through a webpage.

jojy

11:47 pm on Aug 15, 2008 (gmt 0)

10+ Year Member



Thanks, I am checking it.