04.08.2014, 11:35
Depends on how your queries are structured. If you have queries like this:
Then yes, you can simplify it. If however your queries are just this:
UPDATE Player SET var1, var2, var3
then no, you cannot change the amount unless you make your method collect data on all players and in some way dump all information into your database at once, which can create some faults as some players data may not be saved.
Код:
SELECT * FROM Table1; foreach($result as $row) { SELECT * FROM Table2 WHERE ID = $row->table2_id; }
UPDATE Player SET var1, var2, var3
then no, you cannot change the amount unless you make your method collect data on all players and in some way dump all information into your database at once, which can create some faults as some players data may not be saved.