And, finally, if you wanted to show all weapon names, even if the quantity purchased is zero, that's as simple as changing the query slightly. If you are also going to get achievements in the same way, I'd run a separate query to get the playerid:
$sql = "SELECT if FROM players WHERE gamername = '" . $gamername . "'";
... get that id into $playerid ...
... and then ...
$sql = "SELECT WL.weaponname, IFNULL(W.quantity,0) AS quantity "
. " FROM weaponsList AS WL "
. " LEFT JOIN weapons AS W "
. " ON WL.weaponid = W.weaponid AND W.playerid = $playerid "
. " ORDER BY WL.weaponname";
And now you will, indeed, get all the weapons with a quantity of zero if there is no entry in the weapons table for that weaponid and that playerid.