summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/db.inc.php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-11-21 12:31:29 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-11-21 12:31:29 +0000
commit5df2ecce7fdd320a56d91cf07abfd21d4c15ac50 (patch)
tree6bd69a9c22d75d37825e16ae333cd82107887557 /frontends/php/include/db.inc.php
parent363a63e130791275e4523c47474f0027ab0abe0b (diff)
- [NTT-57] merged rev. 5078:5079 of branches/1.4.j/ (Artem) [performance improvement of processing events]
git-svn-id: svn://svn.zabbix.com/trunk@5080 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/db.inc.php')
-rw-r--r--frontends/php/include/db.inc.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/frontends/php/include/db.inc.php b/frontends/php/include/db.inc.php
index ad6bb8b1..b36a4bbf 100644
--- a/frontends/php/include/db.inc.php
+++ b/frontends/php/include/db.inc.php
@@ -459,6 +459,18 @@ if(isset($DB_TYPE) && $DB_TYPE == "ORACLE") {
return 'CONCAT('.implode(',',$params).')';
}
}
+
+ function zbx_sql_mod($x,$y){
+ global $DB_TYPE;
+
+ switch($DB_TYPE)
+ {
+ case "SQLITE3":
+ return ' ('.$x.' %% '.$y.')';
+ default:
+ return ' MOD('.$x.','.$y.')';
+ }
+ }
function DBid2nodeid($id_name)
{