11.04.2011, 19:55
This wont write to the table nothin appear on the table, why?
pawn Код:
if(dialogid == Registerdialog)
{
new password[64],string[200];
format(password,sizeof(password),"%s",inputtext);
format(string,sizeof(string),""lred"Must be more than 3 letters\n"lgreen"Welcome "lblue"%s \n"lyellow"We see you want to register on our "lred"server! \n"lyellow"Type in a password to "lred"register",GetPName(playerid));
if(strlen(password) < 3) return ShowPlayerDialog(playerid,Registerdialog,1,""lred"Register",string,"Register","Cancel");
format(Query,sizeof(Query),"INSET INTO `Users` (`Username`, `Password`) VALUES ('%s','%s')",GetPName(playerid),password);
mysql_query(Query);
mysql_query("SELECT * FROM `Users`");
mysql_store_result();
format(string,sizeof(string),"||- "lgreen"%s "lyellow"has "lred"registered "lyellow"on our server, now we have "lpink"%i "lyellow"registered users! "lred"-||",GetPName(playerid),mysql_num_rows());
SendClientMessageToAll(red,string);
mysql_free_result();
}