Changeset 324
- Timestamp:
- 05/02/12 13:23:13 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r323 r324 2723 2723 # use alphaorder column for "correct" ordering of sort-by-type instead of DNS RR type number 2724 2724 $sql .= " ORDER BY ".($order eq 'type' ? 't.alphaorder' : "r.$order")." $direction"; 2725 # ensure consistent ordering by sorting on record_id too 2726 $sql .= ", record_id $direction"; 2725 2727 2726 2728 my @bindvars = ($id); … … 3133 3135 $args{offset} = 0 if !$args{offset}; 3134 3136 3135 my %sortmap = (fname => 'name', username => 'email', entry => 'entry', stamp => 'stamp ,log_id');3137 my %sortmap = (fname => 'name', username => 'email', entry => 'entry', stamp => 'stamp'); 3136 3138 $args{sortby} = $sortmap{$args{sortby}}; 3137 3139 … … 3141 3143 "WHERE $id_col{$args{logtype}}=?". 3142 3144 ($args{filter} ? " AND entry ~* ?" : ''). 3143 " ORDER BY $args{sortby} $args{sortorder} ".3145 " ORDER BY $args{sortby} $args{sortorder}, log_id $args{sortorder}". 3144 3146 ($args{offset} eq 'all' ? '' : " LIMIT $config{perpage} OFFSET ".$args{offset}*$config{perpage}); 3145 3147 my $loglist = $dbh->selectall_arrayref($sql, { Slice => {} }, ($args{id}, @filterargs) );
Note:
See TracChangeset
for help on using the changeset viewer.