$conds = isset( $info['conds'] ) ? $info['conds'] : array();
$options = isset( $info['options'] ) ? $info['options'] : array();
$join_conds = isset( $info['join_conds'] ) ? $info['join_conds'] : array();
+ $pagefield = $options['ORDER BY'];
if ( $descending ) {
$operator = '>';
} else {
$operator = '<';
}
if ( $offset != '' ) {
- $conds[] = $this->mIndexField . $operator . $this->mDb->addQuotes( $offset );
+ $conds[] = $pagefield . $operator . $this->mDb->addQuotes( $offset );
}
$options['LIMIT'] = intval( $limit );
$SQLqueries[] = '('.$this->mDb->selectSQLText( $tables, $fields, $conds, $fname, $options, $join_conds ).')';