2011-07-28 Ramon Novoa <rnovoa@artica.es>
* operation/events/events_list.php: Changed the event pagination query (was too slow). git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4642 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
84c9b92b80
commit
8e2edc65e2
|
@ -1,3 +1,8 @@
|
||||||
|
2011-07-28 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
|
* operation/events/events_list.php: Changed the event pagination query
|
||||||
|
(was too slow).
|
||||||
|
|
||||||
2011-07-28 Sergio Martin <sergio.martin@artica.es>
|
2011-07-28 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
* include/config_process.php
|
* include/config_process.php
|
||||||
|
|
|
@ -335,13 +335,12 @@ if ($group_rep == 0) {
|
||||||
$sql = "SELECT COUNT(id_evento) FROM tevento WHERE 1=1 ".$sql_post;
|
$sql = "SELECT COUNT(id_evento) FROM tevento WHERE 1=1 ".$sql_post;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$sql = "SELECT COUNT(*) FROM tevento WHERE id_evento IN (SELECT id_evento FROM tevento
|
$sql = "SELECT COUNT(1) FROM (SELECT 1 FROM tevento
|
||||||
WHERE 1=1 $sql_post GROUP BY evento, id_agentmodule)";
|
WHERE 1=1 $sql_post GROUP BY evento, id_agentmodule) AS t";
|
||||||
}
|
}
|
||||||
|
|
||||||
//Count the events with this filter (TODO but not utimestamp).
|
//Count the events with this filter (TODO but not utimestamp).
|
||||||
$total_events = (int) db_get_sql ($sql);
|
$total_events = (int) db_get_sql ($sql);
|
||||||
|
|
||||||
if (empty ($result)) {
|
if (empty ($result)) {
|
||||||
$result = array ();
|
$result = array ();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue