Raised This Month: $ Target: $400
 0% 

SQL Problem with "|"


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Nikol4u
Member
Join Date: Jan 2007
Location: Burgas
Old 10-19-2007 , 08:46   SQL Problem with "|"
Reply With Quote #1

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?
__________________
www.cosy-climbing.net - The official Kreedz community for non-official Kreedz maps

Cosy-Climbing's server IP: 108.61.254.236:27015
Nikol4u is offline
Send a message via ICQ to Nikol4u Send a message via Skype™ to Nikol4u
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:20.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode