From 0b3e94f02d5c4cfcfb93a90896881652eceafc55 Mon Sep 17 00:00:00 2001 From: Jan Klemkow Date: Wed, 21 Nov 2012 13:34:09 +0100 Subject: Add additional error string from database. --- sqlbox/view.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sqlbox/view.php b/sqlbox/view.php index 1158d7b..d334835 100644 --- a/sqlbox/view.php +++ b/sqlbox/view.php @@ -84,7 +84,10 @@ if (isset($data->sqlbox_query)) { if (!db) error("Failed to connect to sqlbox db"); - $result = pg_query($db, $data->sqlbox_query); +// $result = pg_query($db, $data->sqlbox_query); + $result = pg_send_query($db, $data->sqlbox_query); + $result = pg_get_result($db); + echo pg_result_error_field($result, PGSQL_DIAG_SQLSTATE); if (!$result) error("Query failed!"); -- cgit