Guys I really need your help, Im modifying a script but dont know how to update this kind of data: So the sql table is "towns" and I want to update "resources" the data under resources is 0-0-0-0-0 (food-water-stone-wood-gold) So lets say I want to update gold only? how can I do that? Please help me guys
You can get the value of the field, then use explode() to make an array containing the values for gold and the other stuff and then update using the new gold value. If the zeros are constants, it is pointless to use explode(), you should just update to e.g. 0-0-0-$gold-0 There may be a SQL function which could help you, but I am not familiar with it so deeply.