Raised This Month: $ Target: $400
 0% 

How to get unique table id?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
jonatat
Senior Member
Join Date: Dec 2017
Old 06-08-2018 , 12:02   Re: How to get unique table id?
Reply With Quote #6

Quote:
Originally Posted by CrazY. View Post
Try this.

Code:
formatex( szQuery, 3799, "UPDATE matches SET left_score = '%i', right_score = '%i' WHERE match_id = '%i';", scoreCTS, scoreTS, match_id);

But the real problem is in your g_hTuple. Are you sure the connection was made successfully? Also, SQL_GetInsertId will return 0 if you not use INSERT query before.
Thanks CrazY. My insert into looks like that:

PHP Code:
formatex(szQuery3799"INSERT INTO matches (`match_id`, `map`, `played_at`, `left_score`, `right_score`, `state`, `server`, `left_team_id`, `right_team_id`, `game_id`) VALUES ('%s', '%s', NOW(), '0', '0', '0', 'cs.bigmatches.me', '1', '1', '3');"match_idmap_name); 
Also g_hTuple:

PHP Code:
public MySQLx_Init()
{    
g_hTuple SQL_MakeDbTuple(GAME_HOSTGAME_USERGAME_PASSWORDGAME_DATABASE);

for(new 
0sizeof szTablesi++)
{
SQL_ThreadQuery(g_hTuple"QuerySetData"szTables[i]);
}


Last edited by jonatat; 06-08-2018 at 12:03.
jonatat 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 04:37.


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