Just being lazy and not wanting to set up a test BO
I'm trying to do something special when a list of items produces any result which is a multiple of 3 (3,6,9,12 etc), so lets say the number of items returned is 4, would MOD(4,3) give me 1 or 0.333 (it doesn't really matter as long as it's not 0. My formula would then be
IF MOD(Returned results,3) = 0 then do something
1/3 - fail
2/3 - fail
3/3 - pass
4/3 - fail
5/3 - fail
6/3 - pass
and so on
use of MOD
use of MOD
Rocketman
V8.7 Developer Edition. Server 2016 Standard edition. MySql 5.5
V8.7 Developer Edition. Server 2016 Standard edition. MySql 5.5
-
- Posts: 2401
- Joined: Mon Jul 02, 2012 12:24 am
- Location: Ulaanbaatar, Mongolia
Re: use of MOD
If your question is "Should this work?"
I would do precisely the same....in the absence of testing it.
I would do precisely the same....in the absence of testing it.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....