mysql_tquery Tag Mismatch
#1

Code
PHP код:
CMD:adddealer(playerid,params[]){
    new 
Float:x,Float:y,Float:z,dname[32],m[512];
    if(
sscanf(params"s[32]"dname)) return SendClientMessage(playeridCOLOR_GREY"Usage:{FFFFFF} /adddealer [Name]");
    
GetPlayerPos(playeridx,y,z);
    for(new 
i=1;i<MAX_DEALERSHIP;i++){
        if(!
DealerInfo[i][dealer_id]){
            
DealerInfo[i][dealer_id]=i;
            
DealerInfo[i][dealer_pos][0] = x;
            
DealerInfo[i][dealer_pos][1] = y;
            
DealerInfo[i][dealer_pos][2] = z;
            
DealerInfo[i][dealer_pickup] = CreateDynamicPickup(131823x,y,z);
            
            
format(DealerInfo[i][dealer_name], 32"%s"dname);
            
mysql_format(dbhandlemsizeof(m), "INSERT INTO dealerships (x,y,z,name) VALUES ('%f','%f','%f','%s')"DealerInfo[i][dealer_pos][0],DealerInfo[i][dealer_pos][1],DealerInfo[i][dealer_pos][2],DealerInfo[i][dealer_name]);
            new 
Cache:result mysql_function_query(dbhandle,m,false,"","");
            
DealerInfo[i][dealer_sqlid]=cache_insert_id();
            
cache_delete(result);
            
format(msizeof(m), "You have successfully created dealership id %i [SQLID : %i]"DealerInfo[i][dealer_id],DealerInfo[i][dealer_sqlid]);
            
SendClientMessage(playeridCOLOR_GREENm);
            return 
1;
        }
    }
    return 
1;

Error Line
PHP код:
mysql_format(dbhandlemsizeof(m), "INSERT INTO dealerships (x,y,z,name) VALUES ('%f','%f','%f','%s')"DealerInfo[i][dealer_pos][0],DealerInfo[i][dealer_pos][1],DealerInfo[i][dealer_pos][2],DealerInfo[i][dealer_name]);
            new 
Cache:result mysql_function_query(dbhandle,m,false,"","");
            
DealerInfo[i][dealer_sqlid]=cache_insert_id(); 
Also not getting insert_id();
Reply


Messages In This Thread
mysql_tquery Tag Mismatch - by akib - 28.01.2019, 14:27
Re: mysql_tquery Tag Mismatch - by Banditul18 - 28.01.2019, 14:36
Re: mysql_tquery Tag Mismatch - by akib - 28.01.2019, 14:39

Forum Jump:


Users browsing this thread: 1 Guest(s)