How do I write a stored procedure in phpMyAdmin?
+1
A:
Copied from the internets:
The answer is yes and no. Phpmyadmin has no tools for creating stored procedures but you can enter in SQL using it and in that way create them.
(Note I don't believe versions prior to MySQL 5 supported stored procedures.)
Neurofluxation
2010-03-16 12:00:26
ok ..assume if write in the sql area..then where error will popup..
Bharanikumar
2010-03-16 12:02:36
Can you clarify as to why you are expecting an error?
Ardman
2010-03-16 12:07:30
assume if i am not getting any out put then ..how to i cross check...assume if i forgot to put semicolon , then the program is error on know..so how i find these sort of error...where i find
Bharanikumar
2010-03-16 12:11:32
my problem not fixed...still search solution
Bharanikumar
2010-03-16 12:47:49
What you are asking is "If there is an error, how do I find it?" - There is no short answer to this.
Neurofluxation
2010-03-16 14:30:48
+2
A:
In phpMyAdmin you can create the stored procedure in the SQL window.
You may have to set the delimieter to something like "$$" instead of the default ";". You can change this from the bottom of the SQL window.
Daniel Vassallo
2010-03-23 08:29:06
Thanks ...now my sp excuting without Error...How to call the my sp in phpmyadmin,i did somthing like call productpricing();and then i hit the GO button , suddenly page get refreshed, that's it...nothing happen....
Bharanikumar
2010-03-23 10:45:11
To call the stored procedure, simply type `CALL mySproc();` in the SQL window and then hit the GO button.
Daniel Vassallo
2010-03-23 10:49:26
I GOT THIS ERROR #1312 - PROCEDURE ukatn_qa.show_my_country can't return a result set in the given context
Bharanikumar
2010-03-23 11:00:23
Unfortunately this is bug in older versions of phpMyAdmin. It looks like you need to upgrade your phpMyAdmin. Check out the following post: http://stackoverflow.com/questions/2360371/. This bug effects only phpMyAdmin. You would still be able to call the stored procedure from anywhere else (from php, or from the MySql CLI).
Daniel Vassallo
2010-03-23 11:11:04