Hey guys, I have a need to make a stored procedure that on one page, will return be back two variable that I can then use later on in my php code.
Here is what I have so far:
I've heard that if I need this to be a procedure and not a function, I can use SELECT in place of RETURN, but I'm just not seeing any examples how I then utilize the SELECT variables back out in my php after calling the procedure.
CREATE PROCEDURE registerPlayer(IN v_clientType INT(11), IN v_email VARCHAR(120), IN v_gamerName VARCHAR(120), IN v_password CHAR(120), IN v_isGuest INT(1))
INSERT INTO players (portalOrGuest, email, gamerName, password)
SET @v_playerId = last_insert_id();
IF v_isGuest = '1' THEN SET v_gamerName = 'Guest'+@v_playerId;
UPDATE players SET gamerName=v_gamerName WHERE id=@v_playerId;
Any examples how I get @v_playerId; and v_gamerName; back out in the my php as php variables?