Count cache rows - BlueG Plugin
#1

How do I count the number of rows in cache for the blueg plugin. Need to loop through to load all vehicles

Thanks
Reply
#2

pawn Код:
new rows,fields;
cache_get_data(rows,fields);
Reply
#3

That returns the rows. I want to know how many rows so I can loop.
Reply
#4

Quote:
Originally Posted by liam1412
Посмотреть сообщение
That returns the rows. I want to know how many rows so I can loop.
Well that's what it does.. it returns the NUMBER of rows in the database..

Example of mysql loop
pawn Код:
new rows,fields;
cache_get_data(rows,fields);
new i;
while(i < rows) {
    // do your stuff
    i++;
}
Reply
#5

Ah ok. I thought rows actually stored the rows themselves!!

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)