Changeset 637 for trunk/admin/include
- Timestamp:
- Dec 5, 2004, 11:02:36 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/functions.php
r635 r637 505 505 WHERE category_id IN ('.implode(',', $cat_ids).') 506 506 GROUP BY category_id 507 ';507 ;'; 508 508 $result = pwg_query($query); 509 509 $datas = array(); 510 $query_ids = array(); 510 511 while ( $row = mysql_fetch_array( $result ) ) 511 512 { 513 array_push($query_ids, $row['category_id']); 512 514 array_push($datas, array('id' => $row['category_id'], 513 515 'date_last' => $row['date_last'], 514 516 'nb_images' => $row['nb_images'])); 515 517 } 518 // if all links between a category and elements have disappeared, no line 519 // is returned but the update must be done ! 520 foreach (array_diff($cat_ids, $query_ids) as $id) 521 { 522 array_push($datas, array('id' => $id, 'nb_images' => 0)); 523 } 524 516 525 $fields = array('primary' => array('id'), 517 526 'update' => array('date_last', 'nb_images'));
Note: See TracChangeset
for help on using the changeset viewer.