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

Okey, i tryed it but where is my error ?

PHP Code:
public Action:CmdTest(clientargs)
{
    if (
g_bIsTestclient ] == 1)
    {
        new 
BaseDate;
        
CheckDate(clientBaseDate);
        
        
PrintToChat(client"\x05%t \x01> \x05%t Days left (In unixtime): %i""Mod""activated"BaseDate);
    }
    else 
    {
        
PrintToChat(client"\x05%t \x01> \x05%t""Mod""not activated");
        
PrintToChat(client"\x05%t \x01> \x05%t""Mod""buy link");
    }
    
    return 
Plugin_Handled;
}

CheckDate(clientBaseDate)
{
    
decl String:query[255];
    
    
Format(querysizeof(query), "SELECT last_date FROM users WHERE last_date = '%i'"BaseDate);
    
SQL_TQuery(DatabaseT_CheckDatequeryclient);
}  

public 
T_CheckDate(Handle:ownerHandle:hndl, const String:error[], any:client)
{    
    if (
hndl == INVALID_HANDLE)
    {
        
LogToFile(logFile"%s."error);
    }

BFBombi is offline