• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 What Table are IP Addresses Stored In

Adam K M

Active member
#3
Mind sharing?

Update: I'm looking at the xf_ip table, and the actual IP field in phpMyAdmin... doesn't look like an IP Address at all
 

Jake Bunce

XenForo moderator
Staff member
#4
IPs are normally viewed through XenForo. They are not stored in a readable format in the database.

If you are running MySQL 5.6.3 or higher then this function should work to view the stored IPs in the xf_ip table:

Code:
SELECT INET6_NTOA(ip) AS ipaddress
FROM xf_ip
Otherwise there isn't an easy way to query the readable IP since XF started supporting IPv6 addresses.