0

hey guys,, im newbie to stored procedure,,im using the localhost server now,I would like to ask if where to put the stored procedure in my phpmyadmin?Is it from information schema?or in the tables?

3
Contributors
15
Replies
16
Views
7 Years
Discussion Span
Last Post by darkagn
0

If you mean you want to store data in mysql/phpmyadmin then you will need to first open phpmyadmin. Then create a new database. In that new database create a new table. Then bingo php should be able to write into that table.

0

yeah,, i want to make stored procedure,do you mean that I will code a stored procedure inside the table?

0

You don't need to "put" your stored procedure somewhere, you create one by executing a CREATE PROCEDURE statement. As cwarn23 mentioned, you will need a database with tables etc for your procedure to be able to do anything.

0

thank guys for your help,,but i have now my database and table..so how do i call it (the stored procedure) if there were no stored procedure put,,Will I put it in any platform like notepad?

0

actually I understand the tutorial but im still confuse to where do I put this stored procedure?i know how to make stored procedure but where platform should I put it?

0

I'm sorry jay_412 but I don't understand what you are asking. You simply need to run the mysql create procedure query. This can be done in php, or on the command line in Windows, or the shell in Linux, or in a MySQL editor such as SQLyog.

0

its ok darkagn,,im just confuse,,This thing drives me crazy..I tried to put this stored procedure on the phpmyadmin on the information schema/Routines but it cause error.

0

its ok darkagn,,im just confuse,,This thing drives me crazy..I tried to put this stored procedure on the phpmyadmin on the information schema/Routines but it cause error.

Could you say what the error message said. Also if you want to put it into the mysql_query() function you will need it as one long line like the following:

mysql_query('CREATE PROCEDURE productpricing() BEGIN SELECT Avg(columnname) AS priceaverage FROM tablename; END;');

Although I myself am new to this feature too that is how I interperate it.
PS. Although the above code may stretch to two lines to meant to be on one.

0

Could you say what the error message said. Also if you want to put it into the mysql_query() function you will need it as one long line like the following:

mysql_query('CREATE PROCEDURE productpricing() BEGIN SELECT Avg(columnname) AS priceaverage FROM tablename; END;');

Although I myself am new to this feature too that is how I interperate it.
PS. Although the above code may stretch to two lines to meant to be on one.

is it ok to put the stored procedure in the mysql_query()? i thought it will be put on the phpmyadmin,,execpt for the Call productpricing

0

is it ok to put the stored procedure in the mysql_query()? i thought it will be put on the phpmyadmin,,execpt for the Call productpricing

I think it can be done both ways as they both do basically the same thing except phpmyadmin uses mutiple lines.

0

its alright,,but one thing would be the disadvantage,,when you make a long stored proc,,it increases the lines of your code

0

bumpedy bump bump

So other than using the store procedure, what is your aim or your planned result your trying to achieve? Perhaps theres an easier way using php &/or mysql.

0

I haven't used phpmyadmin but I believe it has an SQL Query editor somewhere that you can enter your create procedure query into. That really should be all there is to it...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.