SA-MP Forums Archive
MySQL - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL (/showthread.php?tid=624268)



MySQL - XStormiest - 13.12.2016

Hey guys, can you pls help me understand what's wrong with this part of code.. I just don't get it..

pawn Код:
forward InsertDataMySQL(username[],password[], email[], country[], city[]);
public InsertDataMySQL(username[],password[], email[], country[], city[])
{
    new Query[2048];
    format(Query, sizeof(Query), "INSERT INTO `accounts` ( `Username` ,`Email`, `Password`, `City`, `Country`, `Gender`, `Level`, `HoursPlayed`, `Admin`, `Helper`, `AccountType`, `Ruby`, `Cash`, `Score`, `Votes`, `LastLogin`, `NameBanned`, `Muted`, `Jailed`, `Warnings`) VALUES ( '%s' ,'%s', md5('%e'), '%s', '%s', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, yep, 0, 0, 0, 0)", username, email, password, city, country);
    if(mysql_query(MYSQL_handle, Query) )
        printf("[MySQL] Account %s succesfully created!", username);
    else {
        print("[MySQL] Account creation failed!");
        printf("%s", Query);
    }
    return 1;
}



Re: MySQL - iLearner - 13.12.2016

What is yep? try doing it with 'yep'


Re: MySQL - XStormiest - 13.12.2016

I did that part just for testing.
EDIT: Now it works..lel you saved my lfie.