Guys and Girls,
Im just starting to look into this,
I need to auto insert the next ‘Lead Number (id_lead)’ into an Update form.
This isnt the primary Key, and it doesnt auto increment - becasue leads can be deleted, but must never be reused…
So, I need to query the database, find the last (highest) id_lead value, increment 1, and present it in the Update View (probably not directly in a form field, as the user might not realise that it needs to be saved, so i’ll echo it out next to the form field, something like “[$id_lead_next]<- Suggested Lead Number” and the update view will require an id_lead …
Any help appreciated, im sure its really simple to most of you - but everything i do in Yii is a learning curve, but im surfing it ok!