3

How do I write a stored procedure in phpMyAdmin?

2 Answers 2

5
+100

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.

Stored Procedure in phpMyAdmin

Sign up to request clarification or add additional context in comments.

4 Comments

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....
To call the stored procedure, simply type CALL mySproc(); in the SQL window and then hit the GO button.
I GOT THIS ERROR #1312 - PROCEDURE ukatn_qa.show_my_country can't return a result set in the given context
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).
1

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

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
my problem not fixed...still search solution
What you are asking is "If there is an error, how do I find it?" - There is no short answer to this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.