From 288b4c1b9eacd9afd80f2a5ab860981e6386d03e Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Sat, 24 Nov 2012 14:42:12 +0100 Subject: sqlbox: Print query only if one was supplied --- sqlbox/view.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sqlbox/view.php') diff --git a/sqlbox/view.php b/sqlbox/view.php index 1f7cf41..eedca2b 100644 --- a/sqlbox/view.php +++ b/sqlbox/view.php @@ -81,8 +81,8 @@ $data = $form->get_data(); $correct = true; -echo $OUTPUT->heading('SQL Query: '.$data->sqlbox_query); if (isset($data->sqlbox_query)) { + echo $OUTPUT->heading('SQL Query: '.$data->sqlbox_query); $db = pg_connect("host=localhost dbname=sqlbox user=sqlbox password=foobar"); if (!$db) error("Failed to connect to sqlbox db"); -- cgit