Function or normal exec
#1

This functiun make lag(this is a question not an afirmation)
Quote:

MySQL_SetInteger(sqlid, fieldname[], value, tablename[])
{
new query[256];
format(query, sizeof(query), "UPDATE %s SET %s = %d WHERE id = %d LIMIT 1", tablename, fieldname, value, sqlid);
return mysql_query(query);
}

Is better to use this ?
Quote:

format(query, sizeof(query), "UPDATE %s SET %s = %d WHERE id = %d LIMIT 1", tablename, fieldname, value, sqlid);
mysql_query(query);

Reply
#2

It won't cause lag, if used appropriately.

If you want to update more than one variable, you need to use a full query because it's non-threaded function, it has to process each one. So if you made loads of the SetInteger in the one command, then you're making it un-necessary as you could put it all into one query.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)