diff options
| author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-12-22 09:04:06 +0000 |
|---|---|---|
| committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-12-22 09:04:06 +0000 |
| commit | 68cc73b3adbfe688b31a24e9b6df658aab849218 (patch) | |
| tree | 0d4d2741091569fb71c1091ab654fc79a6721d27 /frontends/php/include/db.inc.php | |
| parent | 2b60bbc5cef1cb978ae93a52f3469b968cb99c99 (diff) | |
| download | zabbix-68cc73b3adbfe688b31a24e9b6df658aab849218.tar.gz zabbix-68cc73b3adbfe688b31a24e9b6df658aab849218.tar.xz zabbix-68cc73b3adbfe688b31a24e9b6df658aab849218.zip | |
- added error reporting of PostgreSQL for frontend (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@3632 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/db.inc.php')
| -rw-r--r-- | frontends/php/include/db.inc.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/frontends/php/include/db.inc.php b/frontends/php/include/db.inc.php index 02eb76b6..09069059 100644 --- a/frontends/php/include/db.inc.php +++ b/frontends/php/include/db.inc.php @@ -272,7 +272,10 @@ COpt::savesqlrequest($query); { $query .= ' limit '.intval($limit); } - $result=pg_exec($DB,$query); + if(!($result = pg_query($DB,$query))) + { + error("Error in query [$query] [".pg_last_error()."]"); + } break; case "ORACLE": if(is_numeric($limit)) @@ -349,7 +352,10 @@ COpt::savesqlrequest($query); } break; case "POSTGRESQL": - $result = pg_exec($DB,$query); + if(!($result = pg_query($DB,$query))) + { + error("Error in query [$query] [".pg_last_error()."]"); + } break; case "ORACLE": $result = DBselect($query); |
