> carrying the object. > > When you load a character, you sprintf(query, "SELECT * from > object_data where > carried_by = '%d'", ch->id)... And when you save a character > you go through > each object and sprintf(query, "UPDATE object_data set > carried_by='%d' where > id='%d'", ch->id, o->id)... This way if player A and player B > log into the mud, > and player A gives player B the "Divine sword of spiffyness". > Then player B > saves and player A doesn't, the mud crashes and they both log > in again, ONLY > player B will have the sword (the objects data got updated > when player B saved, > and the id only references player B). >
A good use for a relational database system. If you properly use it's transaction mechanism then you can minimize data inconsistencies significantly!

