Hi, I do a "select max(id) from table" id is a integer primary key not null and fetchone() returns tuple with quoted value ('223',) should it not rather be (223,) ? Many thanks Tertius