Can we use gloabl variable concept in mysql stored procedure

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
karthikeyan123
Forum Newbie
Posts: 18
Joined: Mon Sep 17, 2007 10:44 pm
Location: India

Can we use gloabl variable concept in mysql stored procedure

Post by karthikeyan123 »

Dear All,

I would like to pass more than one varibales from MYSQL Stored function to a stored procedure.

Or Shall use global varibales. Can we use gloabl variable concept. :(

Kindly let us know a good solution.

Regards,
Karthikeyan R
Begby
Forum Regular
Posts: 575
Joined: Wed Dec 13, 2006 10:28 am

Post by Begby »

You just use the call syntax and pass multiple variables like this

CALL myProcedure(@var1, @var2, @var3)

You need to make sure to declare your stored procedure correctly to take the correct number of variables.

http://dev.mysql.com/doc/refman/5.0/en/call.html
karthikeyan123
Forum Newbie
Posts: 18
Joined: Mon Sep 17, 2007 10:44 pm
Location: India

Post by karthikeyan123 »

Hai Begby,

Thank [s]u[/s] you very much.

Regards,
Karthikeyan R
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:11. Please use proper, complete spelling when posting in the forums. AOL Speak, leet speak and other abbreviated wording can confuse those that are trying to help you (or those that you are trying to help). Please keep in mind that there are many people from many countries that use our forums to read, post and learn. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, use as few abbreviations as possible, especially when using such simple words.

Some examples of what not to do are ne1, any1 (anyone); u (you); ur (your or you're); 2 (to too); prolly (probably); afaik (as far as I know); etc.
Post Reply