Need query to show all IPs by user

Slavik

XenForo moderator
Staff member
SELECT * FROM `xf_ip` WHERE `user_id` =1337

Change 1337 to the users id number
 

tonjohn

Member
Does Xenforo have an index on IPs by default? I know vb didn't and we had to add one or else our moderators will kill the forums hunting down ban evaders.
 

Jake Bunce

XenForo moderator
Staff member
Does Xenforo have an index on IPs by default? I know vb didn't and we had to add one or else our moderators will kill the forums hunting down ban evaders.
Yes I see an index for IPs in the schema. XenForo also stores IPs as integers which has performance benefits, especially when you are searching for a range of IPs.
 

tonjohn

Member
Thanks for the info! I just bought a license to play around with and haven't had a chance to look at it yet.
 
Top