Ignore:
Timestamp:
Oct 17, 2005, 11:11:19 PM (19 years ago)
Author:
plg
Message:
  • bug 154 fixed: "Calendar category, too precise dates". Bug came from the bigger precision of creation_date and available_date in images tables. Need to retrieve only the year-month-day information.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/category_calendar.inc.php

    r867 r896  
    158158  // the number of picture for this day : $calendar_days
    159159  $query = '
    160 SELECT DISTINCT('.$conf['calendar_datefield'].') AS day, COUNT(id) AS count
     160SELECT
     161    DISTINCT DATE_FORMAT('.$conf['calendar_datefield'].', \'%Y-%m-%d\') AS day
     162  , COUNT(id) AS count
    161163  FROM '.IMAGES_TABLE.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON id = image_id
    162164  '.$page['where'].'
Note: See TracChangeset for help on using the changeset viewer.