enumerator
#8

Quote:
Originally Posted by GoldenLion
Посмотреть сообщение
Oh, thank you. I will divide them. But let's say a faction has 15 ranks and I want to set them to 10, this means I need to delete 5 rows. What would be the best way to do it? Doing
Код:
DELETE FROM factionranks WHERE ID = 0 AND Rank = 11;
DELETE FROM factionranks WHERE ID = 0 AND Rank = 12;
DELETE FROM factionranks WHERE ID = 0 AND Rank = 13;
DELETE FROM factionranks WHERE ID = 0 AND Rank = 14;
DELETE FROM factionranks WHERE ID = 0 AND Rank = 15;
is not the best option I assume?
Operators work in SQL as well.

pawn Код:
DELETE FROM factionranks WHERE ID = 0 AND Rank >= 11;
or
pawn Код:
DELETE FROM factionranks WHERE ID = 0 AND (Rank >= 11 AND Rank <= 15);
Quote:
Originally Posted by GoldenLion
Посмотреть сообщение
Because that's not possible.
I was about to edit my post if you hadn't reply and say about this. It is simple - don't use an enumerator for the ranks and avoid all the complicated stuff about finding each index.
Reply


Messages In This Thread
enumerator - by GoldenLion - 26.12.2016, 15:13
Re: enumerator - by Vince - 26.12.2016, 15:41
Re: enumerator - by StrikerZ - 26.12.2016, 15:42
Re: enumerator - by GoldenLion - 26.12.2016, 16:04
Re: enumerator - by Konstantinos - 26.12.2016, 16:51
Re: enumerator - by K0P - 26.12.2016, 16:57
Re: enumerator - by GoldenLion - 26.12.2016, 17:10
Re: enumerator - by Konstantinos - 26.12.2016, 20:27
Re: enumerator - by GoldenLion - 26.12.2016, 20:30
Re: enumerator - by Konstantinos - 26.12.2016, 20:41

Forum Jump:


Users browsing this thread: 1 Guest(s)