It dont need that limit 1 and how to get the last one?
And how to use the result in the next query (the insert)
db.executeQuery("INSERT INTO `player_depotitems` (`player_id`, `depot_id`, `sid`, `pid`, `itemtype`, `count`, `attributes`) VALUES ('".. player .."', '".. depotid .."', '".. sid .."'...