Community discussions

MikroTik App
 
namo
Long time Member
Long time Member
Topic Author
Posts: 530
Joined: Sat Oct 03, 2009 4:44 pm

print hotpot user from certain profile

Fri Dec 31, 2010 3:39 pm

Hello

Ho to print (in new terminal or in text file) a list of hotspot users from certain user profiles (from 4 profiles) in one list?
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: print hotpot user from certain profile

Fri Dec 31, 2010 6:50 pm

/ip hotspot user print where profile=profileName
 
namo
Long time Member
Long time Member
Topic Author
Posts: 530
Joined: Sat Oct 03, 2009 4:44 pm

Re: print hotpot user from certain profile

Sat Jan 01, 2011 7:24 pm

/ip hotspot user print where profile=profileName
if I want more than one profiles but one list , Is the correct command:

/ip hotspot user print where profile=profileName1 AND profile=profileName2

?
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: print hotpot user from certain profile

Sat Jan 01, 2011 8:03 pm

No. That would print all users who have a profile of profileName1 and a profile of profileName2, which is impossible, and would print an empty list. You need to use 'or' rather than 'and'. You are placing logical constraints on conditions, not evaluating the result sets.

Just try things out. You're printing lists so there is no risk.
 
namo
Long time Member
Long time Member
Topic Author
Posts: 530
Joined: Sat Oct 03, 2009 4:44 pm

Re: print hotpot user from certain profile

Sat Jan 01, 2011 8:31 pm

I did this :
/ip hotspot user print where profile=profileName1 or profile=profileName2 or profile =profileName3
and I got
Flags: X - disabled, D - dynamic 
 #   SERVER           NAME         ADDRESS         PROFILE         UPTIME      
ambiguous value of profile, more than one possible value matches input
Note: I correct the or to small letters and now working. thank you few