insert into postcards (card_id, pickup_code, card_picture, recipient, sender, message) values (:card_id, :pickup_code, :image_id, :recipient, :sender, :message) select max(card_id) as card_id from postcards