mysql no insert data help..
#1


HI HOW TO REPAIR CODE, AND INSERT JATEKOSZARMAZAS AND MORE.














Код:
        new password[32]; GetPVarString(playerid,"Password",password,sizeof(password));
		new properties_string[128];

		for(new i = 0; i < MAX_PROPERTIES; i++)
		{
			new sub[20];
			if(i == MAX_PROPERTIES-1) format(sub,sizeof(sub),"%s",Player_Properties[playerid][i]);
			else format(sub,sizeof(sub),"%s,",Player_Properties[playerid][i]);
			strcat(properties_string,sub);
		}

		new escape[128]; mysql_escape_string(query,escape);
		format(query,sizeof(query),"INSERT INTO players (IP,Name,Password,Properties,RegDate,LogDate,Admin,JatekosPenz,JatekosSzint,PosX,PosY,PosZ,JatekosInti,JatekosOles,JatekosHalal,JatekosOra,JatekosPerc,JatekosMPerc,JatekosSkin,JatekosHP,JatekosPancel,JatekosAngle,JatekosWorld,JatekosKick,AdminKick,JatekosMunka,Korhaz,KorhazIdo,PremiumPont,JatekosNem,JatekosKor,JatekosTomeg,JatekosMeret,JatekosSzarmazas) VALUES ('%s','%s',MD5('%s'),'%s','%s','%s',%d,%d,%d,%f,%f,%f,%d,%d,%d,%d,%d,%d,%d,%f,%f,%f,%d,%d,%d,%d,%d,%d,%d,'%s','%s','%s','%s','%s')",
		pIP(playerid),
		pName(playerid),
		password,
		properties_string,
		GetFormatedDate(),
		GetFormatedDate(),
		0,
		750,
		1,
		1753.3008,
		-1894.0869,
		13.5572,
		0,
		0,
		0,
		0,
		0,
		0,
		26,
		100.00,
		0.00,
		266.8277,
		0,
		0,
		0,
		0,
		0,
		0,
		0,
		Player_Properties[playerid][P_SEX],
		Player_Properties[playerid][P_AGE],
		Player_Properties[playerid][P_HEIGHT],
		Player_Properties[playerid][P_WEIGHT],
		Player_Properties[playerid][P_COUNTRY]);
		
		mysql_tquery(SQL,query);
Код:
IALOG(DIALOG_P_AGE)
{
	if(!response) return ShowRegisterDialog(playerid,PHASE_PROPERTIES);
	if(isnull(inputtext)) return ShowRegisterDialog(playerid,PHASE_PROPERTIES);
	if(!IsNumeric(inputtext)) {ERR(playerid,"Csak szбmokat нrhatsz be!"); ShowRegisterDialog(playerid,PHASE_PROPERTIES);}
	else
	{
		new sub[16]; format(sub,sizeof(sub),"%s",inputtext);
		Player_Properties[playerid][P_AGE] = sub;
		ShowRegisterDialog(playerid,PHASE_PROPERTIES);
	}
	return 1;
}

DIALOG(DIALOG_P_SEX)
{
	if(!response) return ShowRegisterDialog(playerid,PHASE_PROPERTIES);
	if(isnull(inputtext)) return ShowRegisterDialog(playerid,PHASE_PROPERTIES);
	new sub[16]; format(sub,sizeof(sub),"%s",inputtext);
	Player_Properties[playerid][P_SEX] = sub;
	ShowRegisterDialog(playerid,PHASE_PROPERTIES);
	return 1;
}

DIALOG(DIALOG_P_COUNTRY)
{
	if(!response) return ShowRegisterDialog(playerid,PHASE_PROPERTIES);
	if(isnull(inputtext)) return ShowRegisterDialog(playerid,PHASE_PROPERTIES);
	new sub[16]; format(sub,sizeof(sub),"%s",inputtext);
	Player_Properties[playerid][P_COUNTRY] = sub;
	ShowRegisterDialog(playerid,PHASE_PROPERTIES);
	return 1;
}
DIALOG(DIALOG_P_HEIGHT)
{
	if(!response) return ShowRegisterDialog(playerid,PHASE_PROPERTIES);
	if(isnull(inputtext)) return ShowRegisterDialog(playerid,PHASE_PROPERTIES);
	if(!IsNumeric(inputtext)) {ERR(playerid,"Csak szбmokat нrhatsz be!"); ShowRegisterDialog(playerid,PHASE_PROPERTIES);}
	else
	{
		new sub[16]; format(sub,sizeof(sub),"%s",inputtext);
		Player_Properties[playerid][P_HEIGHT] = sub;
		ShowRegisterDialog(playerid,PHASE_PROPERTIES);
	}
	return 1;
}

DIALOG(DIALOG_P_WEIGHT)
{
	if(!response) return ShowRegisterDialog(playerid,PHASE_PROPERTIES);
	if(isnull(inputtext)) return ShowRegisterDialog(playerid,PHASE_PROPERTIES);
	if(!IsNumeric(inputtext)) {ERR(playerid,"Csak szбmokat нrhatsz be!"); ShowRegisterDialog(playerid,PHASE_PROPERTIES);}
	else
	{
		new sub[16]; format(sub,sizeof(sub),"%s",inputtext);
		Player_Properties[playerid][P_WEIGHT] = sub;
		ShowRegisterDialog(playerid,PHASE_PROPERTIES);
	}
	return 1;
}
Reply
#2

Show us any errors please thanks
Reply
#3

no log error... phpmyadmin table


example:
JATEKOSZARMAZAS TABLE: EMPTY wtf?,
Reply
#4

Is the variable "query" long enough ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)