How to: Default-value hack for more flexibility (Part 2)
In Part 1 we have seen how to change a value on inserting a new record. Now we are going to change multiple values at once using the same technique. Part 1: Technique + Changing single fields Part 2: Changing multiple fields at once Step 1 and Step 2 Pease follow Step1 and Step 2 from Part 1 of this tutorial. Step 3: Define fieldnames and values A good way for defining multiple fieldname+value tuples in PHP is by using associative arrays: A shorter variant: Please note the assignment operator => between key and value! From my own experience, sometimes …