08.10.2018, 18:32
It does not move to next row (as in SQLite) by itself so the `while` loop would be same as `for`.
I noticed something that it is very weird. Why do you save cache, set active cache and delete cache? Threaded queries do this on their own. Remove it altogether.
About your method, an INSERT INTO .. ON DUPLICATE is better. If you can provide more details about your tables and what you are trying to do by checking if the object has been saved or not, we can fix it.
pawn Код:
new i = 0, rows = cache_num_rows();
while (i < rows)
{
// cache functions
i++;
}
pawn Код:
for (new i = 0, rows = cache_num_rows(); i < rows; i++)
{
// cache functions
}
About your method, an INSERT INTO .. ON DUPLICATE is better. If you can provide more details about your tables and what you are trying to do by checking if the object has been saved or not, we can fix it.