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?

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.

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

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.

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?

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?

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.

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.

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.

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

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.

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

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.

i will use stored procedure at all

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...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.