How to load data ?
#1

Hi guys

I have problem/question about mysql loading data (with the new BlueG R7 plugin)... I have already created creating and saving player data, but how can i load them, with what function ?
mysql_get doesn't work with the new plugin, cache_get_data gets the number of rows and fields, and Select * is selecting all columns not rows. Any Idea ?

Maybe there is some statemant to select all rows like Select * (this is for columns) ?
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=337810
Reply
#3

Quote:
Originally Posted by _Zeus
Посмотреть сообщение
I know that link, with his tutorial i've already made saving and creating data, but how to get the ROW whitch primary key is his name...

If i use
Код:
cache_get_row(0 (HOW TO GET THIS ?), 0, string1);
Then how to get this row... maybe the player row is 36 for example, but i don't know his row, then how to get it ?
Reply
#4

If the rows are not 0,1 then simply use a loop.

pawn Код:
new
    rows,
    fields
;
cache_get_data( rows, fields );
for( new i = 0; i < rows; i++ )
{
    cache_get_row( i, idx, dest[ ] ); // replace idx with the index you want and the destination too.
    // ...
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)