MySQL help?
#1

THis error what i get, maybe you guys are able to slove this.

Код:
15:58:01] [ERROR] CMySQLQuery::Execute[OnQueryFinished] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
PHP код:
case THERAD_SHOW_MOTD:
        {
               for(new 
i;rows;i++)
            {
                   
cache_get_field_content(extraid"gMOTD"GlobalMOTDg_iHandle);
                
cache_get_field_content(extraid"aMOTD"AdminMOTDg_iHandle);
                
cache_get_field_content(extraid"vMOTD"VIPMOTDg_iHandle);
                
cache_get_field_content(extraid"cMOTD"CAMOTDg_iHandle);
                
cache_get_field_content(extraid"pMOTD"pMOTDg_iHandle);
                break;
            }
        } 
PHP код:
stock g_mysql_LoadMOTD()
{
    
mysql_tquery(g_iHandle"SELECT `gMOTD`,`aMOTD`,`vMOTD`,`cMOTD`,`pMOTD` FROM `misc`"true"OnQueryFinished""iii"THERAD_SHOW_MOTDINVALID_PLAYER_ID, -1);
}
stock g_mysql_SaveMOTD()
{
    new 
query[1024];
    
format(querysizeof(query), "UPDATE `misc` SET ");
    
format(querysizeof(query), "%s `gMOTD` = '%s',"querySQL_ReturnEscaped(GlobalMOTD));
    
format(querysizeof(query), "%s `aMOTD` = '%s',"querySQL_ReturnEscaped(AdminMOTD));
    
format(querysizeof(query), "%s `vMOTD` = '%s',"querySQL_ReturnEscaped(VIPMOTD));
    
format(querysizeof(query), "%s `cMOTD` = '%s',"querySQL_ReturnEscaped(CAMOTD));
    
format(querysizeof(query), "%s `pMOTD` = '%s',"querySQL_ReturnEscaped(pMOTD));
    
mysql_tquery(g_iHandlequery"OnQueryFinished""i"THERAD_SHOW_MOTD);


EDIT: i sloved the problem!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)