13.06.2015, 15:06
Ahh i got it now. Thanks
ANyways i made a column. Whenever you write your email it supposed to insert into the E-Mail column which i just created but instead it just create a new section with the email only.
Here is the code:
and here is a photo too
http://gyazo.com/adf69d119ca73ea62d16175783207447
Not sure if this code is needed too.
ANyways i made a column. Whenever you write your email it supposed to insert into the E-Mail column which i just created but instead it just create a new section with the email only.
Here is the code:
Код:
SQL_SubmitEmail(playerid, string[]) // there should be a " , playerid) "
{
new
query[512],name[32];
GetPlayerName(playerid,name,sizeof(name));
// format(query, sizeof(query), "INSERT INTO `accounts` (`ID`, `E-Mail`) VALUES('%d', '%s')", PlayerData[playerid][pID], string);
format(query,sizeof(query), "INSERT INTO `accounts` (`ID`, `E-Mail`) VALUES('%d', '%s')", PlayerData[playerid][pID], string);
mysql_tquery(g_iHandle, query);
}
http://gyazo.com/adf69d119ca73ea62d16175783207447
Not sure if this code is needed too.
Код:
SQL_CreateAccount(const username[], const password[])
{
new
query[512],
buffer[129];
WP_Hash(buffer, sizeof(buffer), password);
format(query, sizeof(query), "INSERT INTO `accounts` (`Username`, `Password`, `RegisterDate`, `LoginDate`) VALUES('%s', '%s', '%s', '%s')", username, buffer, ReturnDate(), ReturnDate());
mysql_tquery(g_iHandle, query);
}

