Changeset 6653 for branches/2.1/include
- Timestamp:
- Jul 3, 2010, 2:16:12 PM (14 years ago)
- Location:
- branches/2.1/include
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.1/include/functions_notification.inc.php
r6598 r6653 477 477 $query = ' 478 478 SELECT date_available, 479 COUNT(DISTINCT id) nb_elements,480 COUNT(DISTINCT category_id) nb_cats479 COUNT(DISTINCT id) AS nb_elements, 480 COUNT(DISTINCT category_id) AS nb_cats 481 481 FROM '.IMAGES_TABLE.' i INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id=image_id 482 482 '.$where_sql.' … … 516 516 {// get some categories ... 517 517 $query = ' 518 SELECT c.uppercats, COUNT(DISTINCT i.id) img_count518 SELECT c.uppercats, COUNT(DISTINCT i.id) AS img_count 519 519 FROM '.IMAGES_TABLE.' i INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON i.id=image_id 520 520 INNER JOIN '.CATEGORIES_TABLE.' c ON c.id=category_id -
branches/2.1/include/functions_tag.inc.php
r6364 r6653 37 37 // we can find top fatter tags among reachable images 38 38 $query = ' 39 SELECT tag_id, COUNT(DISTINCT(it.image_id)) counter39 SELECT tag_id, COUNT(DISTINCT(it.image_id)) AS counter 40 40 FROM '.IMAGE_CATEGORY_TABLE.' ic 41 41 INNER JOIN '.IMAGE_TAG_TABLE.' it ON ic.image_id=it.image_id'.get_sql_condition_FandF … … 224 224 } 225 225 $query = ' 226 SELECT t.*, count(*) counter226 SELECT t.*, count(*) AS counter 227 227 FROM '.IMAGE_TAG_TABLE.' 228 228 INNER JOIN '.TAGS_TABLE.' t ON tag_id = id -
branches/2.1/include/functions_user.inc.php
r6511 r6653 679 679 function get_computed_categories($userdata, $filter_days=null) 680 680 { 681 $query = 'SELECT c.id cat_id, global_rank';681 $query = 'SELECT c.id AS cat_id, global_rank'; 682 682 // Count by date_available to avoid count null 683 683 $query .= ', 684 MAX(date_available) date_last, COUNT(date_available)nb_images684 MAX(date_available) AS date_last, COUNT(date_available) AS nb_images 685 685 FROM '.CATEGORIES_TABLE.' as c 686 686 LEFT JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON ic.category_id = c.id -
branches/2.1/include/ws_functions.inc.php
r6501 r6653 286 286 287 287 $query = ' 288 SELECT i.*, GROUP_CONCAT(category_id) cat_ids288 SELECT i.*, GROUP_CONCAT(category_id) AS cat_ids 289 289 FROM '.IMAGES_TABLE.' i 290 290 INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON i.id=image_id … … 694 694 695 695 $query = ' 696 SELECT COUNT(id) nb_comments696 SELECT COUNT(id) AS nb_comments 697 697 FROM '.COMMENTS_TABLE.' 698 698 WHERE '.$where_comments; … … 1455 1455 { 1456 1456 $query = ' 1457 SELECT image_id, GROUP_CONCAT(tag_id) tag_ids1457 SELECT image_id, GROUP_CONCAT(tag_id) AS tag_ids 1458 1458 FROM '.IMAGE_TAG_TABLE.' 1459 1459 WHERE tag_id IN ('.implode(',',$tag_ids).')
Note: See TracChangeset
for help on using the changeset viewer.