Thank you mate, I spent ages trying to find this!
For anyone else, this is what he was pointing to:
For anyone else, this is what he was pointing to:
SELECT inet_ntoa(conv(hex(location_ip), 16, 10)) as ip, conv(hex(idvisitor), 16, 10) as visitorId FROM piwik_log_visit;