Co best way of saving/loading using mysql.

06/16/2011 06:21 taylor2846#1
i was wanting 2 now the best way 2 do the saving/loading system for my server.


like should i save a player when they logout.
or should i save everything as it changes like a update player void that saves only what changes like a player gets **** gold so it updates mysql database of how much gold they now have.


and what about items best way of handling items inside database.
i am thing about doing a
additem
updateitem
removeitem
thing like i was talking about doing up there for the char.

please post ideals of ways 2 do it/ best way 2 do it.
06/16/2011 10:42 Korvacs#2
Update every value when it changes, SQL is designed to perform thousands and thousands of queries every second so why would you choose to perform 1 query every session. Not to mention if the server crashes players loose literally everything.
06/17/2011 07:14 marlyandedsel#3
yes that Correct Korvacs I have encountered that problem, but then I change the saving/loading method it works no rollback happening now.