Getting records from Stored Procedures?

I have made an stored procedure like this:

DROP PROCEDURE IF EXISTS `get_games_menu` //

CREATE PROCEDURE `get_games_menu`
IN currplayer INT,
OUT gameid INT,
OUT lastdraw INT,
OUT playertiles TEXT,
OUT oppnation INT,
OUT oppname VARCHAR(100),
OUT fdraw INT,
OUT playerpoints INT,
OUT infopop INT,
OUT oppTiles TEXT,
OUT tabletiles TEXT,
OUT playerturn INT,
OUT newtabletiles TEXT,
OUT profileimg VARCHAR(255)
  , gp.player_tiles
  , gp.infoPop
  , gp.first_draw
  , gp.player_points
  , g.table_tiles
  , g.new_tiles
  , gp2.last_draw_type
  , gp2.player_turn
  , gp2.player_tiles
  , u.username
  , u.profileimg
  , playertiles
  , infopop
  , fdraw
  , playerpoints
  , tabletiles
  , newtabletiles
  , lastdraw
  , playerturn
  , oppTiles
  , oppnation
  , oppname
  , profileimg
FROM nf_gameplayer gp
INNER JOIN nf_games g
ON gp.fk_game_id = g.game_id
INNER JOIN nf_gameplayer gp2
ON  gp.fk_game_id = gp2.fk_game_id
AND gp.fk_player_id != gp2.fk_player_id
INNER JOIN nf_users u
ON gp2.fk_player_id =
WHERE gp.fk_player_id = currplayer
AND   g.invite=0
AND   g.deleteby != currplayer
ORDER BY g.lastdraw;
END //

And I am trying to get records from it like this:

$mysqli = new mysqli('localhost', 'root', '', 'mytest');

$rs = $mysqli->query( 'CALL get_games_menu(1, @gameid,@playertiles,@infopop,@fdraw,@playerpoints,@tabletiles,@newtabletiles,@lastdraw,@playerturn,@opptiles,@oppnation,@oppname,@profileimg)' );
while($row = $rs->fetch_object())
    echo $row['gameid']-'<br>';

But I am not getting any records. When doing a normal mysql I get 9 records…

What am I doing wrong. (New with stored procedures).

Thanks in advance :wink:

your query might return 9 rows, but the way you’ve designed your stored proc, it can only return one set of OUT variable values for each CALL

why did you choose to use a stored proc here?