Hi guys,

I need to know how do i keep two user_id fields in a single table in
CakePHP. For example:

I have a "users" table. There are two type of users in this table. 1.
Customers,  2. Customer Service Agents.
I have another table "activity" which shall hold all activities
performed on a customer and who (Customer Service Agent) performed
that activity.


users
--------

id, username, role
1,   john,         Customer
2,   mate         Customer Service Agent


activity
----------

id, created,  title,                                      user_id
(customer)      user_id (Customer Service Agent)

1   xxx        Agent called the customer
John                              Mate
2  xxxx       Agent changed customer's info
John                              Mate


Really need help with best practice how to do this in cake as i'm
stuck here.

Appreciate any help.

--

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-...@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=.


Reply via email to