03.09.2013, 00:11
Hello! I'm doing a house system and I need use loop for it. The loop is for create a ID for the house. I don't wanna auto increment, I wanna the IDs in order always (1,2,3,4) and not (1,3, 4, 7) because of deletion of a house.
But, for get the numbers of row, I have to create a new public e call it with mysql_format_query and that way I don't stop (break) the loop.
How can do it?
Code:
The way up don't work because no callback is called
Sorry for my bad english, I don't know english very well and I don't use ****** translator.
I hope you understand. Help-me, please! Thanks!
But, for get the numbers of row, I have to create a new public e call it with mysql_format_query and that way I don't stop (break) the loop.
How can do it?
Code:
pawn Код:
new rows, field, IDH, str[120];
for(new h = 1; h < 300; h++)
{
mysql_format(DB, str, "SELECT * FROM `house_info` WHERE `ID` = %d", h);
mysql_function_query(DB, str, true, "", "");
cache_get_data(rows, field, DB);
if(!rows)
{
IDH = h;
break;
}
}
Sorry for my bad english, I don't know english very well and I don't use ****** translator.
I hope you understand. Help-me, please! Thanks!