views:

316

answers:

2

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
ok ..assume if write in the sql area..then where error will popup..
Bharanikumar
Can you clarify as to why you are expecting an error?
Ardman
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
Bharanikumar
What you are asking is "If there is an error, how do I find it?" - There is no short answer to this.
Neurofluxation
+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.

Stored Procedure in phpMyAdmin

Daniel Vassallo
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
To call the stored procedure, simply type `CALL mySproc();` in the SQL window and then hit the GO button.
Daniel Vassallo
I GOT THIS ERROR #1312 - PROCEDURE ukatn_qa.show_my_country can't return a result set in the given context
Bharanikumar
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
i look that and get back latest..plz give me a time...
Bharanikumar