hi all ,

new to database, how to design these table in mysql.


Permissions for CRM
1. Broker /Team
a. Add agents
b. Assign agents
c. Add/Edit everything any agent has
2. Agent
a. Can NOT add agents
b. Can NOT assign agents
c. Only add/edit their own leads


any help appre.

Looks like a 1:n relation from Broker to Agent, which means that the Agent table needs a foreign key (broker_id) into the Broker table.
Further you need a 1:n relation from Agents to Leads. And maybe one from Brokers to Leads (depends on the semantics of your app).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.