problem mysql_retrieve_row
#1

Hello,

This is my code:

Код:
    mysql_query("SELECT * FROM cars");
    mysql_store_result();
    new i=1,query[256];
	while(mysql_retrieve_row())
	{
		format(query,sizeof(query),"UPDATE cars SET realid='%d' ",i);
	    mysql_query(query);
        i++;
	}
He have to set a ID for any cars in my database.
So, car1 = 1 car2 = 2 car4=4 etc...

But, I have this: car1=1 (when I create the first), but when I create a second car, I got this: car1= 2 car2 = 2

I don't know why...
Regards
Reply


Messages In This Thread
problem mysql_retrieve_row - by jcvag44800 - 12.05.2014, 16:21
Re: problem mysql_retrieve_row - by Vince - 12.05.2014, 16:29
Re : problem mysql_retrieve_row - by jcvag44800 - 12.05.2014, 16:36

Forum Jump:


Users browsing this thread: 1 Guest(s)