Well, i got query and the code is like this:
Code:
formatex(query,127, "INSERT INTO `%s` VALUES('%s','%s','%s','%s','%d:%02d','**:**','knife','%s')",sql_table,mapname,name,getcountry,authid,(climbertime[id]/60), (climbertime[id]%60),ip)
SQL_ThreadQuery(g_SqlTuple,"addtomysql",query)
Code:
public addtomysql(failstate,Handle:query,error[],errnum,data[],size) {
if(failstate == TQUERY_CONNECT_FAILED) {
log_amx("Couldn't connect to SQL database.")
client_print(0,print_chat,"[%s] Can't connect to the DB to add you in Top15 DB",ct_pluginname)
}
else if(failstate == TQUERY_QUERY_FAILED) {
log_amx("Query failed.")
client_print(0,print_chat,"[%s] Something is wrong with Top15 DB",ct_pluginname)
}
else if(errnum) log_amx("Error #%d: %s",errnum,error)
else {
client_print(0,print_chat,"[%s] Added You Successfully to Top15 DB",ct_pluginname)
}
}
If my nick is "Nikol4u" everything is OK it adds me to the db but if my nick is "Something|Nikol4u" it doesnt add me :S how to avoid this?
__________________