Group System
#1

So far i've studied on using SQLite, But there is one thing i am trying to study, How do you use SQLite for saving Groups? Such as looping them to save them and stuffs? I've already done creating the tables, rows for the Group.

Any idea guys?

And an additional question from my topic which is getting nothing.

Quote:
Originally Posted by _Jake_
Посмотреть сообщение
ObjectID of this?



Name of the object? / ID of it?
Reply
#2

Object ID: 2405.

Not sure about SQLite, as I haven't done CPP in a while (about 4-5 years).
Reply
#3

Thanks, still waiting for the SQLite issue.
Reply
#4

Bump
4char
Reply
#5

I don't know what do you mean about saving groups, show code, if you try do something alone.
Reply
#6

PHP код:
stock saveBusiness(id)
{
    
format(g_szBuffersizeof g_szBuffer
    
"UPDATE "MySQL_BUSINESS_TABLE" SET \
\
        Savininkas = %i,     \
        bizniov = %i,         \
        PirkimoBusena = %i,    \
        Kaina = %f,            \
        Pelnas = %f,        \
        PardavimoKaina = %f,\
        mokestis = %i\
\
    WHERE ID = %i"
,
    
verslas[id][vSavininkas],
    
verslas[id][bName], 
    
verslasid ][ bNupirktas ], 
    
verslasid ][ vKaina ],
    
verslasid ][ vPelnas ],
    
verslasid ][ PardavimoKaina ],
    
verslasid ][ mokamVersla ],
    
verslasid ][ fromSQL ]);
    
sql_query(sqlg_szBufferQUERY_THREADED); // threaded naudoti kai neimi duomenų iљ mysql

and then:
PHP код:
for( new xMAX_VERSLAIx++ )
    {
        
saveBusiness);
    } 
Reply
#7

I would try with this:
pawn Код:
enum gInfo
{
    gName[24],
    members
// ...
};
new GroupInfo[MAX_GROUPS][gInfo];
// saving function
for(new i = 0; i<MAX_GROUPS; i++)
{
    format(string, sizeof(string), "UPDATE `groups` SET `Name`='%s' WHERE `GroupID`='%d'", i, DB_Escape(GroupInfo[i][gName]));
            db_free_result(db_query(GroupDatabase, string));

}
Reply
#8

Alright, How about reading the saved groups? How would i do that? Do i have to loop every GROUP while loading the data?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)