1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-13 18:14:26 +02:00

LogStats: Fix for duplicate-key issue when running log consolidation.

This commit is contained in:
Cameron
2015-07-28 10:19:32 -07:00
parent 585cae01ad
commit 1225105324

View File

@@ -249,10 +249,14 @@ foreach($pageInfo as $key => $info)
$pagetotal = serialize($pageTotal); $pagetotal = serialize($pageTotal);
$insertPageTotal = array('log_data'=> $pageTotal, 'WHERE' => "log_id='pageTotal'");
$sql->replace('logstats', $insertPageTotal);
/*
if(!$sql->update("logstats", "log_data='{$pagetotal}' WHERE log_id='pageTotal' ")) if(!$sql->update("logstats", "log_data='{$pagetotal}' WHERE log_id='pageTotal' "))
{ {
$sql->insert("logstats", "0, 'pageTotal', '{$pagetotal}' "); $sql->insert("logstats", "0, 'pageTotal', '{$pagetotal}' ");
} }*/
/* now we need to collate the individual page information into an array ... */ /* now we need to collate the individual page information into an array ... */