summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/db.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/php/include/db.inc.php')
-rw-r--r--frontends/php/include/db.inc.php26
1 files changed, 14 insertions, 12 deletions
diff --git a/frontends/php/include/db.inc.php b/frontends/php/include/db.inc.php
index c2c4337c..1a998e3d 100644
--- a/frontends/php/include/db.inc.php
+++ b/frontends/php/include/db.inc.php
@@ -22,14 +22,13 @@
// DATABASE CONFIGURATION
- $DB_TYPE ="ORACLE";
+// $DB_TYPE ="ORACLE";
// $DB_TYPE ="POSTGRESQL";
-// $DB_TYPE ="MYSQL";
+ $DB_TYPE ="MYSQL";
$DB_SERVER ="localhost";
-// $DB_DATABASE ="zabbix";
-// $DB_DATABASE ="osmiy";
- $DB_USER ="scott";
- $DB_PASSWORD ="tiger";
+ $DB_DATABASE ="zabbix";
+ $DB_USER ="root";
+ $DB_PASSWORD ="";
// END OF DATABASE CONFIGURATION
// $USER_DETAILS ="";
@@ -277,11 +276,14 @@ COpt::savesqlrequest($query);
}
}
- function zbx_dbstr($var)
- {
- $result = "'".addslashes($var)."'";
-//SDI($result);
- return $result;
- //return "'".addslashes($var)."'";
+/* string value prepearing */
+if($DB_TYPE == "ORACLE") {
+ function zbx_dbstr($var) {
+ return "'".ereg_replace('\'','\'\'',$var)."'";
+ }
+} else {
+ function zbx_dbstr($var) {
+ return "'".addslashes($var)."'";
}
+}
?>