Show
Ignore:
Timestamp:
08/12/05 20:59:53 (7 years ago)
Author:
alexx
Message:

Add pagination to friends list

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/inc/messages/sent.inc.php

    r20 r21  
    3232 
    3333list($first_item, $last_item) = $pager->getOffsetByPageId(); 
    34 $limit_start = $first_item-1; 
    35 $limit_offset = $last_item-$limit_start; 
     34$limit_offset = $first_item-1; 
     35$limit_length = $last_item-$limit_offset; 
    3636 
    37 $messages_r = $db->query('SELECT id, id_mess, id_from, from_str, type, dest, subject, message, flag, date FROM message WHERE id_from=? AND box=? ORDER by date DESC LIMIT !,!', array($_SESSION['my_id'],'send', $limit_start, $limit_offset) ); 
     37$messages_r = $db->query('SELECT id, id_mess, id_from, from_str, type, dest, subject, message, flag, date FROM message WHERE id_from=? AND box=? ORDER by date DESC LIMIT !,!', array($_SESSION['my_id'],'send', $limit_offset, $limit_length) ); 
    3838 
    3939$cache=array();