Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
PhpMyAdmin and Procedures
Old 01-24-2008, 09:19 AM PhpMyAdmin and Procedures
carloncho's Avatar
Skilled Talker

Posts: 80
Name: Carlos
Trades: 0
Is possible to use store procedures in phpMyAdmin? I dont find this possibility.
Thanks.
__________________
-----------------------

Please login or register to view this content. Registration is FREE
carloncho is offline
Reply With Quote
View Public Profile Visit carloncho's homepage!
 
 
Register now for full access!
Old 01-25-2008, 12:23 PM Re: PhpMyAdmin and Procedures
reli4nt's Avatar
Extreme Talker

Posts: 168
Location: New York
Trades: 0
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.)
__________________

Please login or register to view this content. Registration is FREE

Designing the world we live in.
Defining the terms we live by.
reli4nt is offline
Reply With Quote
View Public Profile Visit reli4nt's homepage!
 
Old 01-27-2008, 01:48 AM Re: PhpMyAdmin and Procedures
carloncho's Avatar
Skilled Talker

Posts: 80
Name: Carlos
Trades: 0
Iīve enter the script to create the procedure in the phpMyAdminīs SQL editor, but have an error. I have all permissions (is a local database). It didīt work
I continue work on it. thanks
__________________
-----------------------

Please login or register to view this content. Registration is FREE
carloncho is offline
Reply With Quote
View Public Profile Visit carloncho's homepage!
 
Old 01-27-2008, 01:50 AM Re: PhpMyAdmin and Procedures
carloncho's Avatar
Skilled Talker

Posts: 80
Name: Carlos
Trades: 0
I forget: I use MySQL 5.0.51 and PHP 5.2.5.
__________________
-----------------------

Please login or register to view this content. Registration is FREE
carloncho is offline
Reply With Quote
View Public Profile Visit carloncho's homepage!
 
Old 01-27-2008, 02:13 AM Re: PhpMyAdmin and Procedures
reli4nt's Avatar
Extreme Talker

Posts: 168
Location: New York
Trades: 0
What was the error?
__________________

Please login or register to view this content. Registration is FREE

Designing the world we live in.
Defining the terms we live by.
reli4nt is offline
Reply With Quote
View Public Profile Visit reli4nt's homepage!
 
Old 01-27-2008, 06:23 PM Re: PhpMyAdmin and Procedures
carloncho's Avatar
Skilled Talker

Posts: 80
Name: Carlos
Trades: 0
Quote:
CREATE PROCEDURE test.`get_count_users` ( IN param1 VARCHAR( 50 )

(X) -> ) BEGIN SET @SQL = CONCAT( "SELECT * FROM ", param1, ";" ) ;

Quote:
MySQL:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3
I put the same script in a SQL edit in Toad For MySQL and works good over the same database!! But phpMyAdmin donīt want to work with any procedure script
I test several scripts and the problem are the same. I think that phpMyAdmin not work with procedures. I search Web, but i didnīt found nothing about that
__________________
-----------------------

Please login or register to view this content. Registration is FREE
carloncho is offline
Reply With Quote
View Public Profile Visit carloncho's homepage!
 
Old 01-29-2008, 04:31 AM Re: PhpMyAdmin and Procedures
Average Talker

Posts: 21
Trades: 0
check your MySQL version....
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

jigolo is offline
Reply With Quote
View Public Profile
 
Old 03-22-2008, 05:53 PM Re: PhpMyAdmin and Procedures
carloncho's Avatar
Skilled Talker

Posts: 80
Name: Carlos
Trades: 0
Several years later, i post about this, sorry
Finally, i can use procedures with PHPMyAdmin, but i dont view as an DB Object. Simply i put the create sentence in SQL Editor and send. The procedure exists, i call from php, but the procedures i not listed in phpMyAdmin.
There is a chance to view procedures in phpMyAdmin?
__________________
-----------------------

Please login or register to view this content. Registration is FREE
carloncho is offline
Reply With Quote
View Public Profile Visit carloncho's homepage!
 
Old 03-22-2008, 06:04 PM Re: PhpMyAdmin and Procedures
reli4nt's Avatar
Extreme Talker

Posts: 168
Location: New York
Trades: 0
I really don't think so. PhpMyadmin doesn't support stored procedures. Since it allows you to query the db you can create them but it doesn'thave any tools in place to support them.
__________________

Please login or register to view this content. Registration is FREE

Designing the world we live in.
Defining the terms we live by.
reli4nt is offline
Reply With Quote
View Public Profile Visit reli4nt's homepage!
 
Old 03-23-2008, 12:52 AM Re: PhpMyAdmin and Procedures
joder's Avatar
Flipotron

Posts: 6,442
Name: James
Location: In the ocean.
Trades: 0
In the PhpMyAdmin list of databases should be information_schema. In it is a table name ROUTINES. You query it by issuing a

Code:
select ROUTINE_NAME from ROUTINES;
This will output a list of Stored Procedure names. To see a procedure, run the query

Code:
show create procdure [procedure name from above select]
joder is offline
Reply With Quote
View Public Profile
 
Old 05-21-2008, 05:57 AM Re: PhpMyAdmin and Procedures
Junior Talker

Posts: 2
Trades: 0
Hi

i am able to create procedures at phpmyadmin
can u plz let me know how to use those stored procedures in php
should i use call / execute statement in order to get those results of created stored procedure

thanks..
PavaniMadan is offline
Reply With Quote
View Public Profile
 
Old 05-26-2008, 07:11 PM Re: PhpMyAdmin and Procedures
Junior Talker

Posts: 3
Name: Ed Purkiss
Trades: 0
If you are using mysqli or PDO stuff then it will work pretty much automatically. If you are using the older mysql_ functions, then you must add a flag to the connect directive:

mysql_connect($host, $user, $password, true, 65536);

the 65536 is a magic number flag to allow for multiple responses on the connection. It is not currently documented, but can be found in the php header file.

phpMyAdmin does a crummy job of working with stored procedures, functions and triggers - and executing them from the SQL window is also hit & miss.

I'm looking for anyone that would like to assist me with alpha and beta testing my new open source project, phpMyIDE which is a PHP/JS/Ajax application for managing database-embedded code for MySQL. It can be found here:
<edit>Link removed - Please don't throw original post off topic with your own requests and links</edit>

... many of the questions about working with stored procedures are answered with this app, making working with them a whole lot easier.

Thanks in advance to anyone willing to assist,
/p

Last edited by mgraphic; 05-27-2008 at 08:05 PM.. Reason: removed link
Perkiset is offline
Reply With Quote
View Public Profile
 
Old 07-09-2008, 10:46 AM Re: PhpMyAdmin and Procedures
Junior Talker

Posts: 1
Name: ravilobo
Trades: 0
Quote:
Originally Posted by PavaniMadan View Post
Hi

i am able to create procedures at phpmyadmin
can u plz let me know how to use those stored procedures in php
should i use call / execute statement in order to get those results of created stored procedure

thanks..
Hi,

Mysql version 5.0.X supports stored procedures. PHPmyadmin does not support executing the procedures : 'Call <procedure>'. I hope they will fix this in the next version of phpmyadmin.

So as an work around would be to use an mysql client tool to create & execute the stored procedures.
ravilobo is offline
Reply With Quote
View Public Profile
 
Old 10-30-2008, 04:05 PM Re: PhpMyAdmin and Procedures
Junior Talker

Posts: 3
Name: Ed Purkiss
Trades: 0
hmmm, sorry you thought my post was off topic. Since phpMyIDE is an adjunct to phpMyAdmin and handles this problem quite squarely, I think it's on the dot.

So to answer the just-previous post, there IS a tool for doing this, phpmyide which can be found at phpmyide dot com (it is an open source freeware app, utterly un-monetized). It also allows you to wrap phpMyAdmin into one of the working tabs, so that you can have the formidable benefits of phpMyAdmin in a MySQL stored procedure development IDE.
Perkiset is offline
Reply With Quote
View Public Profile
 
Old 06-16-2009, 09:32 AM Re: PhpMyAdmin and Procedures
Junior Talker

Posts: 2
Name: Sumit Joshi
Trades: 0
Yes. You can create Stored Procedure in PhpMyAdmin.
Here is one example that how you can write it. For that we have to first change the delimiter sign so that we can execute the query.
delimiter //
CREATE PROCEDURE Sample(IN userID INT, OUT userName VARCHAR(20))
BEGIN
SELECT UserName INTO userName FROM TblUsers WHERE UserID=userID;
END

Here is the PHP code. MYSQL: calling sp with out variables.

$rs = mysql_query( "CALL getCountry(1, @userName)" );
$rs = mysql_query( "SELECT @userName" );
while($row = mysql_fetch_assoc($rs))
{
echo $row['@userName'];
}

That's it. Be happy. What ever problem just tell me.
You can contact for more details on joshisumitnet@yahoo.com
You can also find some more PHP code snippest on my blog
http://phpwithsumitjoshi.blogspot.com/

Last edited by joshisumitnet; 06-16-2009 at 09:41 AM..
joshisumitnet is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to PhpMyAdmin and Procedures
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.46373 seconds with 12 queries