#239 Sorting order

BASE
open
nobody
Interface (166)
5
2010-05-03
2010-05-03
Anonymous
No

base 1.4.5

base_stat_sensor.php: " ORDER BY sensor.name ASC",
base_stat_sensor.php: " ORDER BY sensor.name DESC");

Unknown column 'sensor.name' in 'order clause'

$qro->AddTitle(_SIPLTOTALEVENTS,
"occur_a", " ",
" ORDER BY event_cnt ASC",
"occur_d", " ",
" ORDER BY event_cnt DESC");

"missing" -> " ORDER BY event_cnt ASC", and " ORDER BY event_cnt DESC");

Order by unique event not work correctly
$qro->AddTitle(_SIPLUNIEVENTS,
"occur_a", "", " ORDER BY sig_cnt ASC",
"occur_d", "", " ORDER BY sig_cnt DESC");

$sql = "SELECT DISTINCT acid_event.sid, count(acid_event.cid) as event_cnt,".
" count(distinct(acid_event.signature)) as sig_cnt, ".
" count(distinct(acid_event.ip_src)) as saddr_cnt, ".
" count(distinct(acid_event.ip_dst)) as daddr_cnt, ".
"min(timestamp) as first_timestamp, max(timestamp) as last_timestamp".
$sort_sql[0].$from.$where." GROUP BY acid_event.sid ".$sort_sql[1];

Discussion

  • Order by unique event not work correctly
    $qro->AddTitle(_SIPLUNIEVENTS,
    "occur_a", "", " ORDER BY sig_cnt ASC",
    "occur_d", "", " ORDER BY sig_cnt DESC");

    Maybe change to:

    Order by unique event not work correctly
    $qro->AddTitle(_SIPLUNIEVENTS,
    "uoccur_a", "", " ORDER BY sig_cnt ASC",
    "uoccur_d", "", " ORDER BY sig_cnt DESC");