#1

[16:37:39] CMySQLHandler::Query(UPDATE other SET lcnmats='0',yakuzamats='8',rmmats='0',lcnmin='0',y akuzamin='0',rmmin='0',) - An error has occured. (Error ID: 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 код:
stock SaveOther()
{
    new 
src[1024];
    
format(query,sizeof(query),"UPDATE "TABLE_OTHER" SET ");
       
format(src,sizeof(src),"lcnmats='%d',",Mats[16]);
    
strcat(query,src,sizeof(query));
       
format(src,sizeof(src),"yakuzamats='%d',",Mats[17]);
    
strcat(query,src,sizeof(query));
       
format(src,sizeof(src),"rmmats='%d',",Mats[18]);
    
strcat(query,src,sizeof(query));
       
format(src,sizeof(src),"lcnmin='%d',",MafiaMineral[0]);
    
strcat(query,src,sizeof(query));
       
format(src,sizeof(src),"yakuzamin='%d',",MafiaMineral[1]);
    
strcat(query,src,sizeof(query));
       
format(src,sizeof(src),"rmmin='%d',",MafiaMineral[2]);
    
strcat(query,src,sizeof(query));
    
mysql_query(query);

Reply
#2

replace format(src,sizeof(src),"rmmin='%d',",MafiaMineral[2]); with format(src,sizeof(src),"rmmin='%d'",MafiaMineral[2]); (removed the ,)
Reply
#3

Now it's -
PHP код:
 CMySQLHandler::Query(UPDATE other SET lcnmats='0'yakuzamats='0'rmmats='0'lcnmin='0'yakuzamin='0'rmmin='0') - An error has occured. (Error ID1064You have an error in your SQL syntaxcheck the manual that corresponds to your MySQL server version for the right syntax to use near 'yakuzamats='0'rmmats='0'lcnmin='0'yakuzamin='0'rmmin='0'' at line 1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)