0

I'm using a linux shared hosting account with godaddy and I can't seem to get stored procedures working correctly with my MySQL database. I can create them from within phpMyAdmin fine. I can also create them in MySQL workbench fine. However, whenever I try to call the stored procedures either from inside the SQL section of phpmyadmin or from a php page, I get an error:

"PROCEDURE databaseName.ProcedureName can't return a result set in the given context".

The database recognizes that the procedure exists.
Also, this is how I am creating the procedure:

USE `databaseName`;

DROP procedure IF EXISTS `ProcedureName`;

DELIMITER $$

USE `databaseName`$$

CREATE PROCEDURE `databaseName`.`ProcedureName` ()

BEGIN

SELECT * FROM tableName;

END

$$

DELIMITER ;

any help would be greatly appreciated.

Also, I'm not 100% sure that stored procedures are even able to be utilized with shared hosting accounts on godaddy, but I figured there probably was a way to use them since you have access to a MySQL database. However, if for some reason they are not able to be utilized please let me know that as well.

2
Contributors
1
Reply
3
Views
6 Years
Discussion Span
Last Post by davidchilders
0

I'm not familiar with the implementation at the godaddy.com site -

however -

the most common problem with stored procedures that I see are when the USER ACCOUNT that you're using to call the stored procedure does not have EXECUTE privileges for the resource(s) related to running that procedure.

This gets especially sticky when nesting stored procedures as you need to evaluate privilege grants for ALL resources involved.

I hope this gives you a clue as to where to check next -

/David C.

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.