mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 07:44:35 +02:00
2011-06-15 Ramon Novoa <rnovoa@artica.es>
* pandoradb.oracle.sql: Removed unneeded code. * operation/events/events_list.php: Do not show duplicate messages when grouping events. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4451 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
324102f2d7
commit
61c25ee46f
@ -1,3 +1,10 @@
|
|||||||
|
2011-06-15 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
|
* pandoradb.oracle.sql: Removed unneeded code.
|
||||||
|
|
||||||
|
* operation/events/events_list.php: Do not show duplicate messages when
|
||||||
|
grouping events.
|
||||||
|
|
||||||
2011-06-15 Sergio Martin <sergio.martin@artica.es>
|
2011-06-15 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
* include/functions_events.php: Fixed repeated values into
|
* include/functions_events.php: Fixed repeated values into
|
||||||
|
@ -270,7 +270,7 @@ if ($group_rep == 0) {
|
|||||||
else {
|
else {
|
||||||
switch ($config["dbtype"]) {
|
switch ($config["dbtype"]) {
|
||||||
case "mysql":
|
case "mysql":
|
||||||
$sql = "SELECT *, GROUP_CONCAT(user_comment SEPARATOR '') AS user_comment,
|
$sql = "SELECT *, GROUP_CONCAT(DISTINCT user_comment SEPARATOR '') AS user_comment,
|
||||||
MAX(estado) AS estado, COUNT(*) AS event_rep, MAX(utimestamp) AS timestamp_rep
|
MAX(estado) AS estado, COUNT(*) AS event_rep, MAX(utimestamp) AS timestamp_rep
|
||||||
FROM tevento
|
FROM tevento
|
||||||
WHERE 1=1 ".$sql_post."
|
WHERE 1=1 ".$sql_post."
|
||||||
@ -278,7 +278,7 @@ else {
|
|||||||
ORDER BY timestamp_rep DESC LIMIT ".$offset.",".$pagination;
|
ORDER BY timestamp_rep DESC LIMIT ".$offset.",".$pagination;
|
||||||
break;
|
break;
|
||||||
case "postgresql":
|
case "postgresql":
|
||||||
$sql = "SELECT *, array_to_string(array_agg(user_comment), '') AS user_comment,
|
$sql = "SELECT *, array_to_string(array_agg(DISTINCT user_comment), '') AS user_comment,
|
||||||
MAX(estado) AS estado, COUNT(*) AS event_rep, MAX(utimestamp) AS timestamp_rep
|
MAX(estado) AS estado, COUNT(*) AS event_rep, MAX(utimestamp) AS timestamp_rep
|
||||||
FROM tevento
|
FROM tevento
|
||||||
WHERE 1=1 ".$sql_post."
|
WHERE 1=1 ".$sql_post."
|
||||||
@ -289,6 +289,7 @@ else {
|
|||||||
$set = array();
|
$set = array();
|
||||||
$set['limit'] = $pagination;
|
$set['limit'] = $pagination;
|
||||||
$set['offset'] = $offset;
|
$set['offset'] = $offset;
|
||||||
|
// TODO: Remove duplicate user comments
|
||||||
$sql = "SELECT a.*, b.event_rep, b.timestamp_rep
|
$sql = "SELECT a.*, b.event_rep, b.timestamp_rep
|
||||||
FROM (select * from tevento WHERE 1=1 ".$sql_post.") a,
|
FROM (select * from tevento WHERE 1=1 ".$sql_post.") a,
|
||||||
(select min(id_evento) as id_evento, to_char(evento) as evento,
|
(select min(id_evento) as id_evento, to_char(evento) as evento,
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
|
|
||||||
CREATE OR REPLACE FUNCTION UNIX_TIMESTAMP (oracletime IN DATE DEFAULT SYSDATE) RETURN INTEGER AS unixtime INTEGER; BEGIN unixtime := (oracletime - to_date('19700101','YYYYMMDD')) * 86400; RETURN unixtime; END;;
|
CREATE OR REPLACE FUNCTION UNIX_TIMESTAMP (oracletime IN DATE DEFAULT SYSDATE) RETURN INTEGER AS unixtime INTEGER; BEGIN unixtime := (oracletime - to_date('19700101','YYYYMMDD')) * 86400; RETURN unixtime; END;;
|
||||||
CREATE OR REPLACE FUNCTION NOW RETURN TIMESTAMP AS t_now TIMESTAMP; BEGIN SELECT LOCALTIMESTAMP INTO t_now FROM dual; RETURN t_now; END;;
|
CREATE OR REPLACE FUNCTION NOW RETURN TIMESTAMP AS t_now TIMESTAMP; BEGIN SELECT LOCALTIMESTAMP INTO t_now FROM dual; RETURN t_now; END;;
|
||||||
CREATE AGGREGATE array_agg (anyelement) (sfunc = array_append, stype = anyarray, initcond = '{}');;
|
|
||||||
|
|
||||||
CREATE TABLE taddress (
|
CREATE TABLE taddress (
|
||||||
id_a NUMBER(10, 0) NOT NULL PRIMARY KEY,
|
id_a NUMBER(10, 0) NOT NULL PRIMARY KEY,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user