I have a membership table which contains the following fields (as example):
member_id (primary key, auto increment = 123)
lastname (= Smith)
firstname (= David)
publicname (= 123SD)
Note that the value of the field publicname is in fact the combination of the member_id and the first characters of the fields lastname and firstname, respectively.
I manage to insert the values of the first three fields to create a new record as the first step, then create the value for field publicname and insert it into the newly created record as the second step.
My question is, whether it is possible to insert a new record in just ONE sql query: two values for fields firstname and lastname are provided via form input while values for fields member_id and publicname are generated by a php script.
If it is possible, any hint how this could be achieved?
Thanks!