INSERT INTO images (gallery_id, title, description, fstop) SELECT 1+MAX(...), 'title', 'description', 'fstop' FROM images;