- Timestamp:
- Nov 21, 2004, 12:13:48 PM (20 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/category_calendar.inc.php
r606 r612 87 87 SELECT DISTINCT(MONTH('.$conf['calendar_datefield'].')) AS month 88 88 , COUNT(id) AS count 89 FROM '.IMAGES_TABLE.', '.IMAGE_CATEGORY_TABLE.' 90 '.$page['where'].' 91 AND id = image_id 92 AND YEAR('.$conf['calendar_datefield'].') = '.$page['calendar_year'].' 89 FROM '.IMAGES_TABLE.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON id = image_id 90 '.$page['where'].' 91 AND '.$conf['calendar_datefield'].' 92 BETWEEN \''.$page['calendar_year'].'-1-1\' 93 AND \''.$page['calendar_year'].'-12-31\' 93 94 GROUP BY MONTH('.$conf['calendar_datefield'].') 94 95 ;'; … … 158 159 $query = ' 159 160 SELECT DISTINCT('.$conf['calendar_datefield'].') AS day, COUNT(id) AS count 160 FROM '.IMAGES_TABLE.' , '.IMAGE_CATEGORY_TABLE.'161 '.$page['where'].' 162 AND id = image_id163 AND YEAR('.$conf['calendar_datefield'].') = '.$page['calendar_year'].'164 AND MONTH('.$conf['calendar_datefield'].') = '.$page['calendar_month'].'161 FROM '.IMAGES_TABLE.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON id = image_id 162 '.$page['where'].' 163 AND '.$conf['calendar_datefield'].' 164 BETWEEN \''.$page['calendar_year'].'-'.$page['calendar_month'].'-1\' 165 AND \''.$page['calendar_year'].'-'.$page['calendar_month'].'-31\' 165 166 GROUP BY day 166 167 ;'; … … 183 184 $query = ' 184 185 SELECT category_id AS category, COUNT(id) AS count 185 FROM '.IMAGES_TABLE.' , '.IMAGE_CATEGORY_TABLE.'186 FROM '.IMAGES_TABLE.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON id = image_id 186 187 '.$page['where'].' 187 188 AND '.$conf['calendar_datefield'].' = \''.$page['calendar_date'].'\' 188 AND id = image_id189 189 GROUP BY category_id 190 190 ;'; … … 221 221 $query = ' 222 222 SELECT file,tn_ext,'.$conf['calendar_datefield'].',path 223 FROM '.IMAGES_TABLE.', '.IMAGE_CATEGORY_TABLE.' 224 '.$page['where'].' 225 AND YEAR('.$conf['calendar_datefield'].') = '.$calendar_year.' 226 AND id = image_id 223 FROM '.IMAGES_TABLE.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON id = image_id 224 '.$page['where'].' 225 AND '.$conf['calendar_datefield'].' 226 BETWEEN \''.$calendar_year.'-1-1\' 227 AND \''.$calendar_year.'-12-31\' 227 228 ORDER BY RAND() 228 229 LIMIT 0,1 … … 266 267 $query = ' 267 268 SELECT file,tn_ext,'.$conf['calendar_datefield'].',path 268 FROM '.IMAGES_TABLE.' , '.IMAGE_CATEGORY_TABLE.'269 '.$page['where'].' 270 AND YEAR('.$conf['calendar_datefield'].') = '.$page['calendar_year'].'271 AND MONTH('.$conf['calendar_datefield'].') = '.$calendar_month.'272 AND id = image_id269 FROM '.IMAGES_TABLE.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON id = image_id 270 '.$page['where'].' 271 AND '.$conf['calendar_datefield'].' 272 BETWEEN \''.$page['calendar_year'].'-'.$calendar_month.'-1\' 273 AND \''.$page['calendar_year'].'-'.$calendar_month.'-31\' 273 274 ORDER BY RAND() 274 275 LIMIT 0,1 … … 320 321 $query = ' 321 322 SELECT file,tn_ext,'.$conf['calendar_datefield'].',path 322 FROM '.IMAGES_TABLE.' , '.IMAGE_CATEGORY_TABLE.'323 FROM '.IMAGES_TABLE.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON id = image_id 323 324 '.$page['where'].' 324 325 AND '.$conf['calendar_datefield'].' = \''.$calendar_day.'\' 325 AND id = image_id326 326 ORDER BY RAND() 327 327 LIMIT 0,1 -
trunk/install/dbscheme.txt
r606 r612 141 141 index:images_i3 table:images column:average_rate 142 142 index:images_i4 table:images column:hit 143 index:images_i5 table:images column:date_creation 143 144 index:sites_ui1 table:sites column:galleries_url 144 145 index:users_ui1 table:users column:username -
trunk/install/phpwebgallery_structure.sql
r606 r612 146 146 KEY images_i1 (storage_category_id), 147 147 KEY images_i3 (average_rate), 148 KEY images_i4 (hit) 148 KEY images_i4 (hit), 149 KEY images_i5 (date_creation) 149 150 ) TYPE=MyISAM; 150 151
Note: See TracChangeset
for help on using the changeset viewer.