So I have a question regarding the best practice for a PHP page inserting a new row into a table. There are some required fields (aka NOT NULL) and some optional fields (can be NULL). Is it better to insert everything with one query, or just do the required fields, get the inserted ID and update the other fields with one or more other queries?
Is there a big performance hit if I do multiple updates with a where <primary key> = "x"
? Or is it better to do multiple updates so that if one of the optional updates doesn't work, the rest do?