Quote:
Originally Posted by Florin48
PHP код:
format(strt, sizeof(strt), "SELECT * FROM `TABLE_COS` WHERE `id` > 0");
mysql_tquery(SQL, strt, "LoadInfo", "");
public LoadInfo()
{
new cars = 0;
IDD = cache_num_rows();
for(new i = 1; i <= IDD; i++)
{
cars++;
// Next your script
}
printf("Vehicles Created: %d", cars);
}
something like.
|
IDD would be enough, the purpose of the loop is completely pointless. Even then, there is a better way.
pawn Код:
SELECT COUNT(*) FROM table_name
returns 1 row and is retrieved as:
pawn Код:
cache_get_value_int(0, 0, total_vehicles);