Kachoudas
09-06-2004, 06:40 PM
Hello,
For learning reasons, I'm working on a game where I'll be saving on a mysql database datas about around 50 object (x, y, rotation, other stuff including potentially long text - around 12 field by objects).
I'm using loadVars objects, sending them to a PHP page that put them in mysql. It's a turn by turn game, so I don't need to save them very often.
I was wondering : should I send all the datas at once (1 time 50*12 fields), or should I send them object by object (50 time 12 fields) :confused:
does it make any difference ? In term of speed, stability, easyness ? the second version seems easier to write. What if (VERY theorical question ;) ) a few dozens, or a few hundreds players, use the game at the same time?
And the reversed question : can I also use lots of multiple calls to small PHP to read the database whenever I need it, or should I better load everything at once ?
Thanks for your help !
Jerome
For learning reasons, I'm working on a game where I'll be saving on a mysql database datas about around 50 object (x, y, rotation, other stuff including potentially long text - around 12 field by objects).
I'm using loadVars objects, sending them to a PHP page that put them in mysql. It's a turn by turn game, so I don't need to save them very often.
I was wondering : should I send all the datas at once (1 time 50*12 fields), or should I send them object by object (50 time 12 fields) :confused:
does it make any difference ? In term of speed, stability, easyness ? the second version seems easier to write. What if (VERY theorical question ;) ) a few dozens, or a few hundreds players, use the game at the same time?
And the reversed question : can I also use lots of multiple calls to small PHP to read the database whenever I need it, or should I better load everything at once ?
Thanks for your help !
Jerome