View Single Post
BFBombi
Junior Member
Join Date: Jul 2011
Old 07-21-2011 , 16:25   Re: How to get date from database ?
Reply With Quote #9

Sorry, but i can't understand it I want to give last date of user premium
I do this, but server show me SQL_FetchInt reported: Invalid query Handle 7e0077 (error: 2)

PHP Code:
public Action:CmdPremium(clientargs)
{
    if (
g_bIsPremiumclient ] == 1)
    {
        new 
last_date;
        
CheckTest(clientlast_date);
    }
    else 
    {
        
PrintToChat(client"\x05%t \x01> \x05%t""premium""not activated");
        
PrintToChat(client"\x05%t \x01> \x05%t""premium""buy link");
    }
    
    return 
Plugin_Handled;
}

CheckTest(clientlast_date)
{
    
decl String:query[255];
    
    
decl String:auth[32];
    
GetClientAuthString(clientauthsizeof(auth));
    
    
Format(querysizeof(query), "SELECT last_date FROM premium_users_dust2only WHERE steam_id = '%s'"auth);
    
    
last_date SQL_FetchInt(Database5);
    
PrintToChat(client"Your last day in Unixtime: %i"last_date);
    

Please help me with this, i need that. I also locked in another plugins, but it don't work.
BFBombi is offline