Few questions
#1

Q1:
Do I need to use cache_delete(); in my script for the latest, mysql R-39 plugin since it stores cache, and do they cause the server to lag more ??

Q2:
Without MapAndreas is it possible to find the lowest GetPlayerPosFindZ co-ordinate??

Q3:
Is it possible to escape string in query?? For eg, when I type yass1n, but the result in the DB is Yass1n, the result is not returned?? Any possible ways?
Reply
#2

haven't used mysql so i cant answer 1 and 3
but for 2) i think(but won't be accurate)
Reply
#3

3) use mysql_format(..) and use %e for escaping.
Reply
#4

-bump-, not clear with the issue, ******d of case insensitivity in sql, saying to use latin swedish collation, not clear with this.
Reply
#5

Cache is automatically deleted if you use threaded queries, unless you use cache_save (obviously). You must also manually store and delete cache with non-threaded queries.

Set collation to utf8_general_ci. To change collation, see: http://stackoverflow.com/questions/1...e-table-column
Reply
#6

Q3 - issue solved,
Q1 - I use non-threaded queries, since its like "near to hell" changing to threaded queries in my script, that's okay, now in non-threaded queries the cache is saved automatically, but should I delete with the cache_delete(); ?
example
Код:
mysql_format(mysql,query,sizeof(query),"SELECT `clan`,`Clanscore` FROM `clans` ORDER BY `Clanscore` DESC LIMIT 30");
	mysql_query(mysql,query);
    if(cache_num_rows(mysql) > 0)
   	{
	    
	    for(new i = 0; i < cache_get_row_count(); i++)
        {
        cache_get_field_content(i, "clan", Clan);
        cache_get_field_content(i, "Clanscore",score);
        format(content,sizeof(content),"%s%s\t\t%s Score\n",content,Clan,score);
		}

	}
	else if(AdminLevel{playerid} < 4) return SendLangMessage(playerid, _COLOR_RED, "Es gibt keine Clans!","There are no Clans!","No hay clanes!");
now should i use cache_delete(Clan);
Reply
#7

-bump- any ideas??
Reply
#8

If you are using mysql_query - YES you need use cache_delete

new Cache:result = mysql_query(...);
// code
...
...
cache_delete(result);

try use mysql_debug then your code and you will see warning about not cleared cache
Reply
#9

What if I use mysql_function_query(); replacing mysql_query(); will that be a good move ??
Reply
#10

just use mysql_tquery and you dont need to use cache_delete

PHP код:
mysql_tquery(mysql,query,"",""); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)