This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Doesnt save to mysql


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
outsiderlv
Senior Member
Join Date: Mar 2010
Old 05-19-2011 , 13:05   Doesnt save to mysql
Reply With Quote #1

Sometimes it saves but sometimes not.. I dont know the problem.. o_O

PHP Code:
public Save_MySql(id)
{
    new 
pl_name[32]
    new 
pl_id[35]
    
get_user_name(idpl_name31)
    
get_user_authid(idpl_id34)
    
    
replace_all(pl_name31"'""'")
    
    new 
szQuery[128];
    
formatex(szQuerycharsmax(szQuery), "UPDATE `ps_users` SET `nick` = '%s', `points` = '%i', `xp` = '%i', `level` = '%i' WHERE `ps_users`.`id` = '%s';"pl_name,PlayerPOINTS[id],PlayerXP[id],PlayerLevel[id], pl_id)
    
SQL_ThreadQuery(g_SqlTuple"query_handler"szQuery );

and i save with Save_Mysql(id);

Edit: Fixed save for steamid.

Last edited by outsiderlv; 05-21-2011 at 01:09.
outsiderlv is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 05-19-2011 , 13:08   Re: Doesnt save to mysql
Reply With Quote #2

Shouldn't you replace ' with \' ?
__________________
hleV is offline
outsiderlv
Senior Member
Join Date: Mar 2010
Old 05-19-2011 , 13:17   Re: Doesnt save to mysql
Reply With Quote #3

oh yes, but i dont think that is the problem..
outsiderlv is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-19-2011 , 14:09   Re: Doesnt save to mysql
Reply With Quote #4

You realize you are updating the player's steamid saved by the player's name?
Either you have that backwards, or it's some Non-Steam stuff.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply



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:02.


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