View Single Post
LenHard
Senior Member
Join Date: Jan 2016
Old 08-01-2018 , 19:51   Re: How to Get value from Database
Reply With Quote #2

PHP Code:
char[] sQuery = new char[200];        
FormatEx(sQuery200"SELECT `player_xp` FROM `%s` WHERE player_id = \"%s\""TABLEPlayer_Id);
gD_Database.Query(SQL_PlayerXPsQuery); // gD_Database is the Database Handle

public void SQL_PlayerXP(Database hDatabaseDBResultSet hResults, const char[] sError)
{
    if (
hResults == null
        
ThrowError(sError);
    else if (
hResults.RowCount != 1)
        return;
        
    
hResults.FetchRow();
    
hResults.FetchInt(0); // The value

__________________
LenHard is offline