Raised This Month: $ Target: $400
 0% 

[SOLVED] SQLX problem... :(


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 06-14-2007 , 05:28   Re: SQLX problem... :(
Reply With Quote #4

Quote:
Originally Posted by pRED* | NZ View Post
I havn't read all the code but.. On bf2 mod I..

Client connect - attempt to load data (like u've already got). If the query succeeds but has no data (no current entry for that user) then do an insert of all 0's (or '' if it's a string).

Then when you try save always use an update query because everyone will have an entry in the table
Thank you for your answer
I don't know how to check if the Query retrieve Data...0o
But i think i got it working with teame06's solution.

Quote:
Originally Posted by teame06 View Post
http://dev.mysql.com/doc/refman/4.1/...duplicate.html

Use this type of query. The problem is that your database already has the player info and insert can't update the row by itself.

You can use REPLACE ALSO instead of the statement above.
That's pretty nice with "ON DUPLICATE KEY UPDATE" wonder since when this is included to mysql..anyway now it seems to work *smile*

Thank you all for your interest in my problem!

greetz regalis
__________________
regalis is offline
 



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 10:39.


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