A):
First I have a company form, which i create a company name and it is saved in a company table..with an autoincrement id as 001( I used Zerofill in it.)
Creating the company --> I did this..
B):
Then, I have a project form which create project details, in this i have a company field, which can be selected from a drop down list.. I have a project table where is stores the project form details..
I want the project id to be 01, 02...and so on..Each company can have many projects..
eg:
C1 - P1, P2 (id : 01, 02,..)
C2 - P1 (id : 01,..)
C3 - p1, p2, p3 (id: 02..)
Everytime the project is created for a particular company i want the project id to be 01, 02..
If new project from new company then its again 01, 02..and so on..
And also need another validation check in image (B). There are some login field. Every time when the project is being created must check that the username and password doesnt already exists..
Mainly I need to find out the (B) part.
Can any1 help me out to solve this?
Thanks in advance.