From 68964d302248d337e0b632a53615d9882973cb2c Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Mon, 27 May 2013 04:33:14 +0200 Subject: [PATCH] Properly include database query error messages --- class.databaserecord.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/class.databaserecord.php b/class.databaserecord.php index ce0b668..5860293 100644 --- a/class.databaserecord.php +++ b/class.databaserecord.php @@ -516,7 +516,7 @@ abstract class CPHPDatabaseRecordClass extends CPHPBaseClass { $classname = get_class($this); $error = $database->errorInfo(); - throw new DatabaseException("Database insertion query failed in object of type {$classname}. Error message: " . $error[3]); + throw new DatabaseException("Database insertion query failed in object of type {$classname}. Error message: " . $error[2]); } } else