Proper db_free_result() usage?
#1

I have a simple question, which relates to the db_free_result(); function. Is db_free_result(); used only after retrieving a result? Such as:

pawn Код:
new string[128], DBResult:result;
format(string, sizeof(string), "SELECT * FROM `TABLE` WHERE `VALUE` = '%s'", EscapeString("example"));
result = db_query(Database, string);
db_free_result(result); // <---
Or is it to be used during the use of db_query as well (as shown as an example on the Wiki page)?
I've seen numerous examples and different usages, so I really don't understand where and when to use this function. Thanks.
Reply
#2

You only need to free the result if there was a result in the first place. That means: select, show, describe and explain queries.
Reply
#3

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)