Changeset 1516 in ExiteCMS
- Timestamp:
- 07/02/08 21:12:36 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/administration/tools/update_geoip_database.php
r1457 r1516 120 120 } 121 121 } 122 // update the statistics table (if it exists)123 if (dbtable_exists($db_prefix."dls _statistics")) {124 display("* Updating downloadstatistics with an unknown country code.");125 $result = dbquery("SELECT * FROM ".$db_prefix."dls _statistics WHERE ds_cc= ''");122 // update the statistics ip table (if it exists) 123 if (dbtable_exists($db_prefix."dlstats_ips")) { 124 display("* Updating ip statistics with an unknown country code."); 125 $result = dbquery("SELECT * FROM ".$db_prefix."dlstats_ips WHERE dlsi_ccode = ''"); 126 126 while ($data = dbarray($result)) { 127 $cc = GeoIP_IP2Code($data['d s_ip']);127 $cc = GeoIP_IP2Code($data['dlsi_ip']); 128 128 if ($cc != "") { 129 display(" * Updating country code for statistics record '".$data['d s_id']."'.");130 $result2 = dbquery("UPDATE ".$db_prefix."dls _statistics SET ds_cc = '".$cc."' WHERE ds_id = '".$data['ds_id']."'");129 display(" * Updating country code for statistics record '".$data['dlsi_id']."'."); 130 $result2 = dbquery("UPDATE ".$db_prefix."dlstats_ips SET dlsi_ccode = '".$cc."' WHERE dlsi_id = '".$data['dlsi_id']."'"); 131 131 } 132 132 }
Note: See TracChangeset
for help on using the changeset viewer.
