Sqlite help
#1

I am making a clan system using sqlite. Everything is saving correctly but when it loads it only loads data from the first row.Anyone see why that is?

pawn Код:
new DBResult:qResult, query[256];
    //format(query,sizeof(query),"SELECT * FROM `Clans` WHERE `ID` = '%d'",d);
    qResult = db_query(gangs,"SELECT * FROM `Clans`");
    if(db_num_rows(qResult))
    {
        new Field[128];
        db_get_field_assoc(qResult, "ID", Field, 12);
        new i = strval(Field);

        db_get_field_assoc(qResult, "Name", Field, 32);
        strmid(gInfo[i][gName],Field,0,32);

        db_get_field_assoc(qResult, "Members", Field, 12);
        gInfo[i][gMembers] = strval(Field);

        db_get_field_assoc(qResult, "Color", Field, 32);
        strmid(gInfo[i][gColor],Field,0,32);

        db_get_field_assoc(qResult, "Leader", Field, MAX_PLAYER_NAME);
        printf("%s",Field);
    }
    db_free_result(qResult);
Reply


Messages In This Thread
Sqlite help - by new121 - 19.01.2013, 08:05
Re: Sqlite help - by iggy1 - 19.01.2013, 08:12
Re: Sqlite help - by new121 - 19.01.2013, 08:27
Re: Sqlite help - by iggy1 - 19.01.2013, 08:43
Re: Sqlite help - by new121 - 19.01.2013, 08:46

Forum Jump:


Users browsing this thread: 1 Guest(s)