Raised This Month: $ Target: $400
 0% 

How to Get value from Database


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LenHard
Senior Member
Join Date: Jan 2016
Old 08-01-2018 , 19:51   Re: How to Get value from Database
Reply With Quote #1

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
Reply


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


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