Ezilon.com - Target Your Audience, be Seen in Your Region

Multiple updation of tables?

You are viewing this site as a guest. Join our community to get your questions answered and share knowledge. Active members may advertise and ask for a website critique.

They have: 2 posts

Joined: May 2008

hi
I want to update 2 tables with the help of store procedure.How Possible, if both table have same id.

Thanks in advance.

JeevesBond's picture
Moderator

He has: 3,442 posts

Joined: Jun 2002

Well, yes this is certainly possible. It's a bit difficult to help without knowing the specifics, have you read the MySQL documentation on stored procedures?

Talking abstractly, you'll need a procedure that receives the id as a parameter, then updates both tables. Sounds pretty straight-forward. Another way to do it is using a trigger, that updates the second table whenever the first is written to.

Again, let us know some details of what you're trying to do and where you're getting stuck and we'll try to help. Smiling

a Padded Cell our articles site!