I have recently taken over the development of a cmsms site.
Goal: Give roles to users. Assign number 1 representing "data entry" to a client id.
Three tables, security, security_role_owner, and security_role_enrollment.
Security has the field person_id, we need to grab the MAX from there.
Security_role_owner has the field security_role_id we need to grab number 1 out of there.
Security_role_enrollment has the fields security_role_id which the number 1 from field security_role_id from table security_role_owner will need to be inserted. Also has client_id which will have the MAX from the field person_id in table security.
So, In the table security_role_enrollment, the field security_role_id should have the value of 1, and the field client_id should have the MAX value (aka newest members person_id number).
Now if only someone could put that in php form =]
When I do it with my little experience I receive errors.
Registration Module
Moderator: General Moderators
Re: Registration Module
I think you need to re-think what you need to do. Getting the highest ID number could lead to skipping some users if more than one registered before the script is run.
At a broader level, this is a forum where we help people solve their php problems, but we don't write scripts for them. If you haven't even tried to get a script running, you're unlikely to find anyone here who will do that for you.
At a broader level, this is a forum where we help people solve their php problems, but we don't write scripts for them. If you haven't even tried to get a script running, you're unlikely to find anyone here who will do that for you.