Added update and getLastInsertId helpers