php - Prepared Statement Inner Join Cannot Pass Parameter by Reference -
i've been trying figure out while , i've searched similar problems, can't find solution.
i'm working on game setup application , i'm having issue prepared statement.
if ($stmt = $connection->prepare("select pack.id, count(race.name) pack inner join race on pack.id = race.pack pack.id = ? group race.pack")) { $stmt->bind_param("s", $_session["id"]); $stmt->execute(); $stmt->bind_result($rsltid, rsltraces); while ($stmt->fetch()) { $racespack[$rsltid] = $rsltraces; } $stmt->close(); }
this returns error: "fatal error: cannot pass parameter 2 reference".
any help/advice appreciated!
your $stmt->bind_result($rsltid, rsltraces);
wrong. should $stmt->bind_result($rsltid, $rsltraces);
Comments
Post a Comment