summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2012-11-23 13:32:50 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-11-23 14:16:16 +0100
commit1792444a81b019a7a842d2ba5e869ca4d3ae91b2 (patch)
treeca312be35bcf1211dc933f24219f35fcf25a7a61
parent61b29ca9336b66d7c35600cae29d0211b8a19f7f (diff)
downloadsqltutor-plugin-1792444a81b019a7a842d2ba5e869ca4d3ae91b2.tar.gz
sqltutor-plugin-1792444a81b019a7a842d2ba5e869ca4d3ae91b2.tar.bz2
sqltutor-plugin-1792444a81b019a7a842d2ba5e869ca4d3ae91b2.zip
sqlbox/view: Fix missing $ in db connection check
The default error_reporting of moodle, made that this programming error wasnt found earlier.
-rw-r--r--sqlbox/view.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/sqlbox/view.php b/sqlbox/view.php
index 9940306..1f7cf41 100644
--- a/sqlbox/view.php
+++ b/sqlbox/view.php
@@ -84,7 +84,7 @@ $correct = true;
echo $OUTPUT->heading('SQL Query: '.$data->sqlbox_query);
if (isset($data->sqlbox_query)) {
$db = pg_connect("host=localhost dbname=sqlbox user=sqlbox password=foobar");
- if (!db)
+ if (!$db)
error("Failed to connect to sqlbox db");
$table = db_table_from_query($db, $data->sqlbox_query);