16.01.2017, 12:22
Hi! I have a problem with my clan system. In database i use auto increment on every /createclan. Some clans will expire and will be deleted.
I am using it in public IniClans:
It is wrong because until few months I reached clanID 50+ in database.
cache_get_row_count is counting how many rows i have in database, not the value of clanID`s.
So, for example if i have 7 clans in database, the 'cache_get_row_count' gets the value 7, and 2 of the clans have clanID value 48, 14 (from auto increment)etc... it won't be loaded because it has an clanID above 7. How can I fix it? What function do I have to use to count the maximum value of clanID?
I am using it in public IniClans:
Код HTML:
for ( new i, j = cache_get_row_count ( ); i != j; ++i ) { }
cache_get_row_count is counting how many rows i have in database, not the value of clanID`s.
So, for example if i have 7 clans in database, the 'cache_get_row_count' gets the value 7, and 2 of the clans have clanID value 48, 14 (from auto increment)etc... it won't be loaded because it has an clanID above 7. How can I fix it? What function do I have to use to count the maximum value of clanID?