When a player moves an item to his character the item type(type) is sent to the server
in the case where a player equips an armband the type = “bracelet” Id like it to attempt to put the item id in the leftbracer column under the game_moblist (players and badguys in game) table first then the right if the left has an item_id already. I use the value = 0 to indicate an empty slot.
if (type=="bracelet"){
to_sql="UPDATE game_moblist SET leftbracer"="+item_id+" WHERE id="+player_id
}
previously I was using a select first but I’d like to do it in 1 query. Thanks.
Just use an IF to se if leftbracer = 0, and set the value to either the new item id or keep the old value