I needed to fetch the points for a Building at a certain level. For this, I created a Stored procedure in MySQL Workbench 5.2 CE as following:
CREATE DEFINER=`tribalwars`@`%` PROCEDURE `GetPoints`(IN BuildingID INT, IN BuildingLevel INT, OUT Pts INT) BEGIN Select Points INTO Pts From Points Where BID = @BuildingID AND bLevel = @BuildingLevel; END
When I execute the following command I get either a NULL or BLOB entry:
CALL GetPoints(1,1,@pts); Select @pts;
My Table that I'm querying is as follows:
Field Type Null Key Default Extra BID int(11) NO PRI NULL bLevel int(11) NO PRI NULL Points int(11) NO NULL
can someone please tell me what I'm missing or doing wrong?