BlueG simple MySQL load question.
#1

Alright. So, what I need resolved is how to read through a query result, that has more than one row.

The code:

PHP код:
     for(new 0mysql_num_rows(); i++)
    {
        new 
row[128];
        new 
field[5][128];
        
mysql_fetch_row_format(row"|");
        
explode(rowfield"|");
        
CarStats[playerid][Unid][i] = strval(field[0]);
        
CarStats[playerid][Carid][i] = strval(field[1]);
        
CarStats[playerid][Ownerid][i] = strval(field[2]);
        
CarStats[playerid][Color1][i] = strval(field[3]);
        
CarStats[playerid][Color2][i] = strval(field[4]);
        
mysql_retrieve_row(); //Described to be the same as mysql_next_row();
    

I tried that, but it doesn't seem to work.

The MySQL query is:
PHP код:
new str[128];
format(strsizeof(str), "SELECT * FROM Cars WHERE Ownerid = '%d'"UserStats[playerid][Uniqueid]);
mysql_query(str);
mysql_store_result(); 
I need this resolved ASAP. Thank you

EDIT: IT'S NOT THE VERSION WITH CASHING! I know how to do it in that version, but I don't know how to here.
Reply


Messages In This Thread
BlueG simple MySQL load question. - by Kaaajmak - 04.01.2013, 19:37
Re: BlueG simple MySQL load question. - by [HiC]TheKiller - 04.01.2013, 19:40
Re: BlueG simple MySQL load question. - by Vince - 04.01.2013, 19:57
Re: BlueG simple MySQL load question. - by Kaaajmak - 04.01.2013, 20:03
Re: BlueG simple MySQL load question. - by Kaaajmak - 04.01.2013, 20:06

Forum Jump:


Users browsing this thread: 1 Guest(s)