- Timestamp:
- Nov 21, 2009, 8:52:50 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/cat_perm.php
r4331 r4334 60 60 FROM '.CATEGORIES_TABLE.' 61 61 WHERE status = \'private\' 62 LIMIT 0 OFFSET162 LIMIT 1 63 63 ;'; 64 64 -
trunk/admin/element_set_global.php
r4331 r4334 475 475 WHERE id IN ('.implode(',', $page['cat_elements_id']).') 476 476 '.$conf['order_by'].' 477 LIMIT '.$page['start'].' OFFSET '.$page['nb_images'].' 478 ;'; 479 //echo '<pre>'.$query.'</pre>'; 477 LIMIT '.$page['nb_images'].' OFFSET '.$page['start'].' 478 ;'; 480 479 $result = pwg_query($query); 481 480 482 481 // template thumbnail initialization 483 484 482 while ($row = pwg_db_fetch_assoc($result)) 485 483 { -
trunk/admin/element_set_unit.php
r4331 r4334 197 197 WHERE id IN ('.implode(',', $page['cat_elements_id']).') 198 198 '.$conf['order_by'].' 199 LIMIT '.$page[' start'].' OFFSET '.$page['nb_images'].'199 LIMIT '.$page['nb_images'].' OFFSET '.$page['start'].' 200 200 ;'; 201 201 $result = pwg_query($query); -
trunk/admin/include/functions.php
r4331 r4334 598 598 WHERE category_id = '.$category_id.' 599 599 ORDER BY '.DB_RANDOM_FUNCTION.'() 600 LIMIT 0 OFFSET1600 LIMIT 1 601 601 ;'; 602 602 list($representative) = pwg_db_fetch_row(pwg_query($query)); -
trunk/admin/include/functions_history.inc.php
r4331 r4334 162 162 ;'; 163 163 164 // LIMIT '.$ page['start'].' OFFSET '.$conf['nb_logs_page'].'164 // LIMIT '.$conf['nb_logs_page'].' OFFSET '.$page['start'].' 165 165 166 166 $result = pwg_query($query); -
trunk/admin/rating.php
r4331 r4334 177 177 GROUP BY r.element_id 178 178 ORDER BY ' . $available_order_by[$order_by_index][1] .' 179 LIMIT '.$ start.' OFFSET '.$elements_per_page.'179 LIMIT '.$elements_per_page.' OFFSET '.$start.' 180 180 ;'; 181 181 -
trunk/comments.php
r4331 r4334 327 327 { 328 328 $query.= ' 329 LIMIT '.$ start.' OFFSET '.$page['items_number'];329 LIMIT '.$page['items_number'].' OFFSET '.$start; 330 330 } 331 331 $query.= ' -
trunk/include/calendar_monthly.class.php
r4331 r4334 349 349 $query.= ' 350 350 ORDER BY RAND() 351 LIMIT 0 OFFSET1';351 LIMIT 1'; 352 352 unset ( $page['chronology_date'][CDAY] ); 353 353 -
trunk/include/category_cats.inc.php
r4325 r4334 106 106 ).' 107 107 ORDER BY RAND() 108 LIMIT 0,1108 LIMIT 1 109 109 ;'; 110 110 $subresult = pwg_query($query); … … 134 134 ).' 135 135 ORDER BY RAND() 136 LIMIT 0,1136 LIMIT 1 137 137 ;'; 138 138 $subresult = pwg_query($query); -
trunk/include/functions_notification.inc.php
r4331 r4334 445 445 GROUP BY date_available 446 446 ORDER BY date_available DESC 447 LIMIT 0 OFFSET'.$max_dates.'447 LIMIT '.$max_dates.' 448 448 ;'; 449 449 $result = pwg_query($query); … … 465 465 AND tn_ext IS NOT NULL 466 466 ORDER BY RAND(NOW()) 467 LIMIT 0 OFFSET'.$max_elements.'467 LIMIT '.$max_elements.' 468 468 ;'; 469 469 $dates[$i]['elements'] = array(); … … 485 485 GROUP BY category_id 486 486 ORDER BY img_count DESC 487 LIMIT 0 OFFSET'.$max_cats.'487 LIMIT '.$max_cats.' 488 488 ;'; 489 489 $dates[$i]['categories'] = array(); -
trunk/include/functions_tag.inc.php
r4325 r4334 240 240 $query .= ' 241 241 ORDER BY counter DESC 242 LIMIT 0,'.$max_tags;242 LIMIT '.$max_tags; 243 243 } 244 244 else -
trunk/include/section_init.inc.php
r3282 r4334 491 491 '.$forbidden.' 492 492 '.$conf['order_by'].' 493 LIMIT 0,'.$conf['top_number'].'493 LIMIT '.$conf['top_number'].' 494 494 ;'; 495 495 … … 518 518 '.$forbidden.' 519 519 '.$conf['order_by'].' 520 LIMIT 0,'.$conf['top_number'].'520 LIMIT '.$conf['top_number'].' 521 521 ;'; 522 522 $page = array_merge( -
trunk/include/ws_functions.inc.php
r4331 r4334 293 293 GROUP BY i.id 294 294 '.$order_by.' 295 LIMIT '.(int) ($params['per_page']*$params['page']).' OFFSET '.(int)$params['per_page'];295 LIMIT '.(int)$params['per_page'].' OFFSET '.(int)($params['per_page']*$params['page']); 296 296 297 297 $result = pwg_query($query); … … 683 683 WHERE '.$where_comments.' 684 684 ORDER BY date 685 LIMIT '.(int) ($params['comments_per_page']*$params['comments_page']).686 ' OFFSET '.(int) $params['comments_per_page'];685 LIMIT '.(int)$params['comments_per_page']. 686 ' OFFSET '.(int)($params['comments_per_page']*$params['comments_page']); 687 687 688 688 $result = pwg_query($query); … … 1399 1399 AND ', $where_clauses).' 1400 1400 '.$order_by.' 1401 LIMIT '.(int) ($params['per_page']*$params['page']).' OFFSET '.(int)$params['per_page'];1401 LIMIT '.(int)$params['per_page'].' OFFSET '.(int)($params['per_page']*$params['page']); 1402 1402 1403 1403 $result = pwg_query($query); -
trunk/random.php
r3282 r4334 53 53 ).' 54 54 ORDER BY RAND(NOW()) 55 LIMIT 0,'.min(50, $conf['top_number'],$user['nb_image_page']).'55 LIMIT '.min(50, $conf['top_number'],$user['nb_image_page']).' 56 56 ;'; 57 57
Note: See TracChangeset
for help on using the changeset viewer.