aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-03 16:42:25 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-03 16:42:25 +0000
commited7854c6e006935d8be9b0e860111767f40b3b48 (patch)
treedf085cd25a5ed7d450ce3a237694da86e4f9ccf2
parentdee5c38edea5fb9f3acd61a91b6669b97b80ec7f (diff)
downloadelgg-ed7854c6e006935d8be9b0e860111767f40b3b48.tar.gz
elgg-ed7854c6e006935d8be9b0e860111767f40b3b48.tar.bz2
Added query display to database exceptions
git-svn-id: https://code.elgg.org/elgg/trunk@395 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/database.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/engine/lib/database.php b/engine/lib/database.php
index 7f012fc17..e2a92c1cd 100644
--- a/engine/lib/database.php
+++ b/engine/lib/database.php
@@ -150,7 +150,7 @@
}
if (mysql_errno($dblink))
- throw new DatabaseException(mysql_error($dblink));
+ throw new DatabaseException(mysql_error($dblink) . " QUERY: " . $query);
if (empty($resultarray)) {
return false;
@@ -185,7 +185,7 @@
}
if (mysql_errno($dblink))
- throw new DatabaseException(mysql_error($dblink));
+ throw new DatabaseException(mysql_error($dblink) . " QUERY: " . $query);
return false;
}
@@ -209,7 +209,7 @@
return mysql_insert_id($dblink);
if (mysql_errno($dblink))
- throw new DatabaseException(mysql_error($dblink));
+ throw new DatabaseException(mysql_error($dblink) . " QUERY: " . $query);
return false;
}
@@ -233,7 +233,7 @@
return mysql_affected_rows();
if (mysql_errno($dblink))
- throw new DatabaseException(mysql_error($dblink));
+ throw new DatabaseException(mysql_error($dblink) . " QUERY: " . $query);
return false;
@@ -258,7 +258,7 @@
return mysql_affected_rows();
if (mysql_errno($dblink))
- throw new DatabaseException(mysql_error($dblink));
+ throw new DatabaseException(mysql_error($dblink) . " QUERY: " . $query);
return false;
}