Added last_insert_id() function in database