MySQL – Convert IP to Decimal
-
I am in need of converting all the ips on the wp_comments table to decimal format, and I was wondering how you would go abouts doing that. I understand that it should be possible on phpmyadmin with a simple query, but I don’t know how to actually write out the query.
I gathered from the internet that there is a command called ip2long() that should convert it just fine, but I don’t know how to specify that command to the wp_comments; comment_author_IP table.
Please help!
PS. I am also in need of help converting the GMT timestamps on the same table (comment_date_gmt) to unix time. I don’t even have a command for it, but it seems people were able to convert unix to the time format that wordpress has, so it must be possible to go the other way around.
Thank you so much
- The topic ‘MySQL – Convert IP to Decimal’ is closed to new replies.