MySQL Forums
Forum List  »  MySQL Query Browser

Calling a stored procedure from Query Browser
Posted by: Carl Alumbuagh
Date: September 24, 2007 01:02PM

I'm just starting out with MySQL and have an issue with the Query Browser. I have created a simple stored procedure.

DELIMITER $$

DROP PROCEDURE IF EXISTS `crashcourse`.`ordertotal` $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `ordertotal`(
IN onumber INT,
OUT ototal DECIMAL(8,2)
)
BEGIN
SELECT Sum(item_price*quantity)
FROM orderitems
WHERE order_num = onumber
INTO ototal;
END $$

DELIMITER ;

From the Command line I Call the procedure and assign a variable to the results.

mysql> CALL ordertotal(20005, @total);
Query OK, 0 rows affected (0.00 sec)

mysql> SELECT @total;
+--------+
| @total |
+--------+
| 149.87 |
+--------+
1 row in set (0.00 sec)

mysql>

However when I call the procedure in the Query Browser the resultset returns null.

Is there something I'm missing or doing wrong?

Query Browser Version is 1.2.12
MySQL Version is 5.0.45
OS is Vista Business and XP



Edited 1 time(s). Last edit at 09/24/2007 01:08PM by Carl Alumbuagh.

Options: ReplyQuote


Subject
Written By
Posted
Calling a stored procedure from Query Browser
September 24, 2007 01:02PM


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.