Changeset 868 for trunk/admin/stats.php


Ignore:
Timestamp:
Sep 18, 2005, 11:56:56 PM (19 years ago)
Author:
plg
Message:
  • bug 107 fixed: crash when logging visit on a category containing "'" character. Correction reported from branch 1.4
  • bug fixed: in admin/stats, incorrect SQL queries gave no result.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/stats.php

    r775 r868  
    8181  if (isset($_GET['month']) && isset($_GET['year']) )
    8282  {
    83     $where_clause = "DATE_FORMAT(date,'%Y-%m-%d') = '".$row['d']."'";
    84     $value = substr($row['d'],8,2);
     83    $where_clause = 'DAYOFMONTH(date) = '.$row['d'].'
     84    AND MONTH(date) = '.$row['m'].'
     85    AND YEAR(date) = '.$row['y'];
     86    $week_day = $lang['day'][date('w', mktime(12,0,0,$row['m'],$row['d'],$row['y']))];
     87    $value = $row['d'].' ('.$week_day.')';
    8588  }
    8689  else
     
    98101  // Number of pictures seen
    99102  $query = '
    100 SELECT COUNT(*) as p,
    101     FILE as f
     103SELECT COUNT(*) as p
    102104    FROM '.HISTORY_TABLE.'
    103105    WHERE '.$where_clause.'
    104106    AND FILE = \'picture\'
    105     GROUP BY FILE
    106107;';
    107108  $pictures = mysql_fetch_array(pwg_query( $query ));
Note: See TracChangeset for help on using the changeset viewer.