Raised This Month: $ Target: $400
 0% 

mysql question


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
whosyourdaddy
Senior Member
Join Date: Apr 2008
Old 02-01-2009 , 19:25   mysql question
Reply With Quote #1

lets say i do
Code:
SQL_Connect
to connect to my mysql database, am i going to stay connected until i do
Code:
SQL_FreeHandle

on the queries or do i get disconnected from the mysql after x amount of minutes that go by

edited*

and can any1 tell me the difference between
Code:
format( szQuery, 511, "REPLACE INTO `wc3_player_race` ( `player_id` , `race_id` , `race_xp` ) VALUES ( '%d', '%d', '%d');", iUniqueID, p_data[id][P_RACE], p_data[id][P_XP] );
SQL_ThreadQuery( g_DBTuple, "_MYSQLX_Save_T", szQuery );
 
public _MYSQLX_Save_T( failstate, Handle:query, error[], errnum, data[], size )
{
    // Error during the query
    if ( failstate )
    {
        new szQuery[256];
        SQL_GetQueryString( query, szQuery, 255 );

        MYSQLX_ThreadError( query, szQuery, error, errnum, failstate, 1 );
    }
}

and
Code:
format( szQuery, 511, "REPLACE INTO `wc3_player_race` ( `player_id` , `race_id` , `race_xp` ) VALUES ( '%d', '%d', '%d');", iUniqueID, p_data[id][P_RACE], p_data[id][P_XP] );
new Handle:query = SQL_PrepareQuery( g_DBConn, szQuery );
    if ( !SQL_Execute( query ) )
    {
        client_print( id, print_chat, "%s Error, unable to save your XP, please contact a server administrator", g_MODclient );
        MYSQLX_Error( query, szQuery, 4 );
        return;
    }


Last edited by whosyourdaddy; 02-01-2009 at 19:33.
whosyourdaddy is offline
 


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


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