Mysql problem
#1

Hey,
I'm stuck at creating in-game email system:
pawn Код:
if(dialogid == 26 && response)
    {
        switch(listitem)
        {
            case 0:
            {
                SPD(playerid, 27, DIALOG_STYLE_INPUT, "E-Mail", "Irasykite PILNA gavejo varda\n(E-Mail'us galima siusti ir atsijungusiems zaidejams):", "Toliau", "Baigti");
            }
            case 1:
            {
                new query[255];
                format(query, sizeof(query), "SELECT * FROM emailai WHERE receiver_name = '%s'", PlayerName(playerid));
                mysql_query(1, query);
                mysql_store_result();
                new rows = mysql_num_rows();
                if(rows == 0) SPMB(playerid, "Neturi gautu zinuciu!");
                else
                {
                    new s[1000];
                    for(new i = 1; i <= rows; i++)
                    {
                        // here i want to loop through all stored rows and get fields, but how? :(((
                    }
                }
                mysql_free_result();
            }
            case 2:
            {
           
            }
        }
    }
+rep for helper
Reply


Messages In This Thread
Mysql problem - by kamiliuxliuxliux - 03.06.2014, 07:26
Re: Mysql problem - by Youice - 03.06.2014, 08:05

Forum Jump:


Users browsing this thread: 1 Guest(s)