summaryrefslogtreecommitdiffstats
path: root/Db.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'Db.class.php')
-rw-r--r--Db.class.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/Db.class.php b/Db.class.php
index 6be4c94..813de24 100644
--- a/Db.class.php
+++ b/Db.class.php
@@ -111,7 +111,7 @@ class DB
catch(PDOException $e)
{
# Write into log and display Exception
- echo $this->ExceptionLog($e->getMessage(),$this->sQuery->queryString);
+ echo $this->ExceptionLog($e->getMessage(), $query );
die();
}
@@ -169,7 +169,16 @@ class DB
else {
return NULL;
}
- }
+ }
+
+ /**
+ * Returns the last inserted id.
+ * @return string
+ */
+ public function lastInsertId() {
+ return $this->pdo->lastInsertId();
+ }
+
/**
* Returns an array which represents a column from the result set
*
@@ -239,4 +248,4 @@ class DB
return $exception;
}
}
-?> \ No newline at end of file
+?>