How do I write a stored procedure in phpMyAdmin?
2 Answers
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.
4 Comments
Bharanikumar
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....
Daniel Vassallo
To call the stored procedure, simply type
CALL mySproc(); in the SQL window and then hit the GO button.Bharanikumar
I GOT THIS ERROR #1312 - PROCEDURE ukatn_qa.show_my_country can't return a result set in the given context
Daniel Vassallo
Unfortunately this is bug in older versions of phpMyAdmin. It looks like you need to upgrade your phpMyAdmin. Check out the following post: 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).
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.)
3 Comments
Bharanikumar
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
my problem not fixed...still search solution
Barrie Reader
What you are asking is "If there is an error, how do I find it?" - There is no short answer to this.
