Ignore:
Timestamp:
Nov 21, 2009, 1:15:22 PM (14 years ago)
Author:
nikrou
Message:

Feature 1255 : improve sql
Replace in queries LIMIT N,M by LIMIT N OFFSET M

File:
1 edited

Legend:

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

    r4325 r4331  
    445445  GROUP BY date_available
    446446  ORDER BY date_available DESC
    447   LIMIT 0,'.$max_dates.'
     447  LIMIT 0 OFFSET '.$max_dates.'
    448448;';
    449449  $result = pwg_query($query);
     
    465465    AND tn_ext IS NOT NULL
    466466  ORDER BY RAND(NOW())
    467   LIMIT 0,'.$max_elements.'
     467  LIMIT 0 OFFSET '.$max_elements.'
    468468;';
    469469      $dates[$i]['elements'] = array();
     
    485485  GROUP BY category_id
    486486  ORDER BY img_count DESC
    487   LIMIT 0,'.$max_cats.'
     487  LIMIT 0 OFFSET '.$max_cats.'
    488488;';
    489489      $dates[$i]['categories'] = array();
Note: See TracChangeset for help on using the changeset viewer.