-- clear existing ipcountry table (dump file doesn't drop table beforehand. it does try to create it again)
DROP TABLE `ipcountry`
-- phpMyAdmin import: IPCountry.mysql.dump
-- clear existing ip table entries
TRUNCATE `ip`
-- add entries with appropriate country id
INSERT INTO `ip` (`start`, `end`, `ci`)
SELECT ipFROM, ipTO, country.id
FROM ipcountry
INNER JOIN country ON country.abbreviation = ipcountry.countrySHORT
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article