Wrapping fetchColumn() inside an if-statement to avoid errors
Merge pull request #494 from NicNLD/lastinsertid

Fixing Record::lastInsertId()