Skip navigation links

MySQL Forums :: Stored Procedures :: Create Stored Procedure Issues with PhpMyAdmin


Advanced Search

Re: Create Stored Procedure Issues with PhpMyAdmin
Posted by: Nate Smith ()
Date: February 13, 2009 12:49PM

The following scenario works for me when creating stored procedures in phpMyAdmin.

Scenario for Command Line
-------------------------
What if I had a SQL script like this:

/* Start Command Line Script */
DELIMITER $$

DROP PROCEDURE IF EXISTS spTest $$
CREATE PROCEDURE spTest ()
BEGIN

SELECT 'Test' FROM DUAL WHERE 1=1;

END $$

DELIMITER ;
/* End Command Line Script */


Scenario for phpMyAdmin
-----------------------
If I wanted to run the above script in phpMyAdmin, I could do so in the following manner:

1. Go to any SQL tab in phpMyAdmin.
2. Directly below the SQL text area you'll see a text input labeled "Delimiter." In that field, enter "$$". This is the delimiter I was trying to use in the example above.
3. I can then paste in this slightly-modifed SQL script. Notice, I've removed the DELIMITER statements. phpMyAdmin handles that for me.

/* Start phpMyAdmin Script */
DROP PROCEDURE IF EXISTS spTest $$
CREATE PROCEDURE spTest ()
BEGIN

SELECT 'Test' FROM DUAL WHERE 1=1;

END $$
/* End phpMyAdmin Script */


Using this method, you can easily create and modify stored procedures in phpMyAdmin.

-Nate

Options: ReplyQuote


Subject Views Written By Posted
Create Stored Procedure Issues with PhpMyAdmin 40043 Glass Hopper 11/13/2006 09:44AM
Re: Create Stored Procedure Issues with PhpMyAdmin 15160 Pancoro Pamungkas 11/13/2006 07:25PM
Re: Create Stored Procedure Issues with PhpMyAdmin 12391 Glass Hopper 11/15/2006 10:35AM
Re: Create Stored Procedure Issues with PhpMyAdmin 11866 Arian Fornaris 11/19/2007 05:52PM
Re: Create Stored Procedure Issues with PhpMyAdmin 9598 Peter Brawley 11/20/2007 10:27AM
Re: Create Stored Procedure Issues with PhpMyAdmin 7977 tim gapinski 06/09/2008 08:32AM
Re: Create Stored Procedure Issues with PhpMyAdmin 8332 Chad Lloyd 11/24/2007 11:00PM
Re: Create Stored Procedure Issues with PhpMyAdmin 7816 Dmitry Pigorev 11/22/2007 03:21AM
Re: Create Stored Procedure Issues with PhpMyAdmin 7525 Dmitry Pigorev 11/22/2007 03:24AM
Re: Create Stored Procedure Issues with PhpMyAdmin 6861 Jacob Mathew 03/20/2008 08:55AM
Re: Create Stored Procedure Issues with PhpMyAdmin 4953 numb nosheen 08/05/2008 10:19PM
Re: Create Stored Procedure Issues with PhpMyAdmin 4839 Peter Brawley 08/06/2008 07:25AM
Re: Create Stored Procedure Issues with PhpMyAdmin 7884 Nate Smith 02/13/2009 12:49PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.