Changeset 6125


Ignore:
Timestamp:
05/08/10 20:43:50 (9 years ago)
Author:
nikrou
Message:

Amend bug 1559. standard deviation was not removed in some places.
So, sqlite crashed because std function has been removed.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/rating.php

    r5196 r6125  
    170170       MAX(r.date)          AS recently_rated, 
    171171       COUNT(r.rate)        AS nb_rates, 
    172        SUM(r.rate)          AS sum_rates, 
    173        ROUND(STD(r.rate),2) AS std_rates 
     172       SUM(r.rate)          AS sum_rates 
    174173  FROM '.RATE_TABLE.' AS r 
    175174    LEFT JOIN '.IMAGES_TABLE.' AS i ON r.element_id = i.id 
     
    207206       'U_URL' => $image_url, 
    208207       'AVG_RATE' => $image['average_rate'], 
    209        'STD_RATE' => $image['std_rates'], 
    210208       'SUM_RATE' => $image['sum_rates'], 
    211209       'NB_RATES' => (int)$image['nb_rates'], 
  • trunk/admin/themes/default/template/rating.tpl

    r5207 r6125  
    3939  <td>{'Number of rates'|@translate}</td> 
    4040  <td>{'Average rate'|@translate}</td> 
    41   <td>{'Controversy'|@translate}</td> 
    4241  <td>{'Sum of rates'|@translate}</td> 
    4342  <td>{'Rate'|@translate}</td> 
     
    5150  <td rowspan="{$image.NB_RATES_TOTAL+1}"><strong>{$image.NB_RATES}/{$image.NB_RATES_TOTAL}</strong></td> 
    5251  <td rowspan="{$image.NB_RATES_TOTAL+1}"><strong>{$image.AVG_RATE}</strong></td> 
    53   <td rowspan="{$image.NB_RATES_TOTAL+1}"><strong>{$image.STD_RATE}</strong></td> 
    5452  <td rowspan="{$image.NB_RATES_TOTAL+1}" style="border-right: 1px solid;" ><strong>{$image.SUM_RATE}</strong></td> 
    5553</tr> 
  • trunk/include/functions_rate.inc.php

    r5196 r6125  
    121121SELECT COUNT(rate) AS count 
    122122     , ROUND(AVG(rate),2) AS average 
    123      , ROUND(STD(rate),2) AS stdev 
    124123  FROM '.RATE_TABLE.' 
    125124  WHERE element_id = '.$image_id.' 
  • trunk/include/ws_functions.inc.php

    r6051 r6125  
    677677SELECT COUNT(rate) AS count 
    678678     , ROUND(AVG(rate),2) AS average 
    679      , ROUND(STD(rate),2) AS stdev 
    680679  FROM '.RATE_TABLE.' 
    681680  WHERE element_id = '.$image_row['id'].' 
Note: See TracChangeset for help on using the changeset viewer.