I need an faster way for this ..
#4

I use SQLite (concepts are the same) so I may not be the best person to write the 'working' code, only confident with the theory side. However I will see what I can do.

After seeing your edit it appears that you're using the strtok incorrectly.

edit: Jeepers, that strtok is scary.. you should be able to use samp_mysql_get_field which would be a lot easier for you and probably more efficient.

pawn Код:
format(query, sizeof(query), "SELECT * FROM `players` WHERE `Name` = '%s' LIMIT 1", "14aa41");
    samp_mysql_query(query);
    samp_mysql_store_result();
    samp_mysql_fetch_row(Data);

    // Here's the pudding, try this instead of strtok and loop :p
    new
        intBuf[64];

    samp_mysql_get_field("<enter_the_name_of_admin_level_field_here>", intBuf);
    print("The admin level is %d", strval(intBuf));
Reply


Messages In This Thread
I need an faster way for this .. - by Dj_maryo1993 - 22.08.2010, 22:19
Re: I need an faster way for this .. - by Simon - 22.08.2010, 23:31
Re: I need an faster way for this .. - by Dj_maryo1993 - 22.08.2010, 23:45
Re: I need an faster way for this .. - by Simon - 22.08.2010, 23:52
Re: I need an faster way for this .. - by Dj_maryo1993 - 23.08.2010, 00:14

Forum Jump:


Users browsing this thread: 1 Guest(s)