MySQL
#1

Hi everybody,
sorry for my English
That's when I connect to the server nothing happens no dialog nothing

Код HTML:
public OnPlayerConnect(playerid)
{
    AntiDeAMX();
	Logged[playerid] = false;

    new query[128]; //We use this variable to format our query
	GetPlayerName(playerid, nsql[playerid], 24); //Getting player's name
	GetPlayerIp(playerid, IP[playerid], 16); //Getting layer's IP
	mysql_format(mysql, query, sizeof(query),"SELECT `Pass`, `ID` FROM `utilisateur` WHERE `Nom` = '%e' LIMIT 1", nsql[playerid]);
	mysql_tquery(mysql, query, "OnAccountCheck", "i", playerid);
    return 1;
}
Код HTML:
forward OnAccountCheck(playerid);
public OnAccountCheck(playerid)
{
	new rows, fields; //a variable that will be used to retrieve rows and fields in the database.
	cache_get_data(rows, fields, mysql);//let's get the rows and fields from the database.
	if(rows) //if there is row
	{//then
		cache_get_field_content(0, "Pass", pInfo[playerid][Pass], mysql, 129);
		pInfo[playerid][pID] = cache_get_field_content_int(0, "ID"); 
		ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Connexion", "connnecte toi fdp !!!", "Connexion", "Quitter");
	}
	else 
	{
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "inscription", "inscrie toi enkuler de ton pere", "inscrire", "partir");
	}
	return 1;
}
Код HTML:
-- --------------------------------------------------------

--
-- Structure de la table `utilisateur`
--

CREATE TABLE IF NOT EXISTS `utilisateur` (
  `ID` int(10) NOT NULL,
  `Nom` varchar(24) NOT NULL,
  `Pass` varchar(129) NOT NULL,
  `Admin` int(10) NOT NULL,
  `IP` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Reply


Messages In This Thread
MySQL - by Sirop - 31.07.2016, 16:07
Re: MySQL - by Shinja - 31.07.2016, 16:33
Re: MySQL - by Sirop - 31.07.2016, 16:38
Re: MySQL - by Shinja - 31.07.2016, 16:41
Re: MySQL - by Shinja - 31.07.2016, 16:43
Re: MySQL - by Sirop - 31.07.2016, 16:53
Re: MySQL - by Konstantinos - 31.07.2016, 17:24
Re: MySQL - by Sirop - 31.07.2016, 17:30
Re: MySQL - by Konstantinos - 31.07.2016, 18:16
Re: MySQL - by Shinja - 31.07.2016, 19:08

Forum Jump:


Users browsing this thread: 2 Guest(s)