Another simple one

Franks Andy (IT Technical Architecture Manager) Andy.Franks at sath.nhs.uk
Mon Dec 14 15:02:23 CET 2015


Hi,
  Did a search for this, can't find an answer, so apologies if it's covered.

FR 3.1.0 latest from git.

Is there any way of getting the index # of the variable I'm looking at in a foreach loop? After doing a sql map (new functionality) I have back a number of rows from a sql DB, and want to reference the index of each variable I'm updating, but I need to know where I'm at in order to do a variable[x] for the other variables that match the one I'm doing a foreach on, if that makes sense.
If there isn't an easy way, I'll pass the index back from SQL as a field, but it seemed kind of unnecessary if there's a simple way.
Thanks!
Andy


More information about the Freeradius-Users mailing list