MYSQL SCRIPT TO SQL VERSION:D
#1

Hellog guys Can somebody help me to convert this MYSQL script into SQL version? REP++;

pawn Код:
new query[200];
    format(query, sizeof(query), "SELECT IP FROM `users` WHERE `name` = '%s' LIMIT 1", PlayerName2(playerid));
    mysql_query(query);
    mysql_store_result();
    new rows = mysql_num_rows();
    SendClientMessage(playerid, ~1,"Welcome to MySQL Server Test!");
    if(!rows)
    {
        TextDrawSetString(Text:SFSL2[playerid],"~g~~h~] ~r~~h~R~w~egister ~b~~h~A~w~ccount ~g~~h~]");
        new rstring[256];
        format(rstring,256,""W"Welcome "YE"%s"W", on "NAME_S"\n\n"W"Please "G"Register"W" to save your stats: "COL_ORANGE"Score,Money,Coins...", PlayerName2(playerid));
        ShowPlayerDialog(playerid,RegisterDialog,DIALOG_STYLE_PASSWORD,""W"Location:"G" Register Account",rstring,"(Register)","(Quit)");
    }
    if(rows == 1)
    {
        new IP[2][16];
        mysql_fetch_field_row(IP[0],"IP");
        GetPlayerIp(playerid, IP[1], 16);
        if(strlen(IP[0]) != 0 && !strcmp(IP[0], IP[1], true))
        {
            MySQL_Login(playerid);
        }
        else if(!strlen(IP[0]) || strcmp(IP[0], IP[1], true))
        {
            new lstring[256];
            TextDrawSetString(Text:SFSL2[playerid],"~g~~h~] ~r~~h~L~w~og In ~b~~h~A~w~ccount ~g~~h~]");
            format(lstring,256,""W"Welcome back "YE"%s"W", on "NAME_S" "W"server\n\nPlease "R"Login "W"to access your account:", PlayerName2(playerid));
            ShowPlayerDialog(playerid,LoginDialog,DIALOG_STYLE_PASSWORD,""W"Location:"G" Account Login",lstring,"(Login)","(Quit)");
            AccInfo[playerid][Registered] = 1;
        }
    }
    mysql_free_result(); // Free
Reply
#2

Nobody?
Reply
#3

SORRY FOR DOUBLE POST!! but help me please!
Reply
#4

They say there's no such thing as a stupid question... This proves that statement is wrong.

SQL is the query language used in MySQL and other database systems - what exactly do you want? SQLite? Why would you want to move to SQLite?
Reply
#5

cuz i want to use it on SQLite platform if can somebody make something like this in SQLite...
AUTO LOGIN by IP!
Reply
#6

You can do that with MySQL...
Reply
#7

All my server is on SQLite now.. I can't use mysql
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)