26.05.2010, 14:24
I have this command to save the emails in email.txt, was wondering how do I save in MySql (Database), I'm still new to MySql not know how to do
I appreciate your help
Sorry My Bad English, Iam Brazilian
I appreciate your help
pawn Code:
command(email, playerid, params[])
{
new
email[128],
emailstring[128],
pname[20],
msgadmins[128];
if(sscanf(params, "s", email)) return SendClientMessage(playerid, Grey, "/email [email]");
new File:emails=fopen("emails.txt", io_append);//********SAVING IN MYSQL? **********
format(emailstring, sizeof(emailstring), "%s\n", email);//********SAVING IN MYSQL? **********
fwrite(emails, emailstring);//********SAVING IN MYSQL? **********
fclose(emails);//********SAVING IN MYSQL? **********
GetPlayerName(playerid, pname, sizeof(pname));
format(msgadmins, sizeof(msgadmins), "%s register email (%s).", pname, email);
SendClientMessage(playerid, Green, "Thankx For Register!.");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerAdmin(i))
{
SendClientMessage(i, Yellow, msgadmins);
}
}
}
return 1;
}


you have all system in mysql?