Registration Module

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
cthomas
Forum Newbie
Posts: 1
Joined: Wed Jul 02, 2008 11:21 am

Registration Module

Post by cthomas »

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.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Registration Module

Post by califdon »

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.
Post Reply