Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/bin/parse_logs/count_update_pings.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'bin/parse_logs/count_update_pings.class.php')
-rw-r--r--bin/parse_logs/count_update_pings.class.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/parse_logs/count_update_pings.class.php b/bin/parse_logs/count_update_pings.class.php
index e7b1f66..b9dd642 100644
--- a/bin/parse_logs/count_update_pings.class.php
+++ b/bin/parse_logs/count_update_pings.class.php
@@ -62,7 +62,7 @@ class Count_Update_Pings {
* Pulls all GUIDs and add-on IDs from database for quick lookup
*/
function cacheGUIDs() {
- $guid_query = $this->db->read("SELECT id, guid FROM addons");
+ $guid_query = $this->db->query("SELECT id, guid FROM addons");
while ($guid_row = mysql_fetch_array($guid_query)) {
$guids[$guid_row['guid']] = $guid_row['id'];
}
@@ -148,14 +148,14 @@ class Count_Update_Pings {
echo "\n[UpdatePingCounter] WRITING COUNTS TO DATABASE...\n";
foreach ($this->counts as $date => $addons) {
foreach ($addons as $addon_id => $counts) {
- $existing_entry_qry = $this->db->read("SELECT * FROM update_counts WHERE addon_id='{$addon_id}' AND date='{$date}'");
+ $existing_entry_qry = $this->db->query("SELECT * FROM update_counts WHERE addon_id='{$addon_id}' AND date='{$date}'", true);
$existing_result = mysql_fetch_array($existing_entry_qry);
// If row does not exist for date and add-on, insert new row
if (empty($existing_result)) {
$counts = $this->serializeCounts($counts);
- $this->db->write("
+ $this->db->query("
INSERT INTO update_counts (
addon_id,
count,
@@ -172,7 +172,7 @@ class Count_Update_Pings {
'{$counts['app']}',
'{$counts['os']}',
'{$date}'
- )");
+ )", true);
outputIfVerbose("[UpdatePingCounter] Created record for: {$date} / {$addon_id}");
}
@@ -180,7 +180,7 @@ class Count_Update_Pings {
else {
$counts = $this->unserializeAndTotalCounts($counts, $existing_result);
- $this->db->write("
+ $this->db->query("
UPDATE update_counts
SET
count = {$counts['total']},
@@ -191,7 +191,7 @@ class Count_Update_Pings {
WHERE
addon_id='{$addon_id}' AND
date='{$date}'
- ");
+ ", true);
outputIfVerbose("[UpdatePingCounter] Updated record for: {$date} / {$addon_id}");
}