i was created a table named "contacts"..
in tat contact table i have a column called "createdby"
then if a admin can create a new contact info. those details will be inserted and the created by column have the value user name or id..
in that the login user can create new user i.e) user regsitration to login..
the registerd user details are inserted into another table..
and also i have maintaining another table called "user_reg"
in tat table i have 3 columns namely "id","adminid","userid"
here i want to "count" the contact info. according to "createdby" column value..
id name Addre createdby
1 raj ss admin
2 ram ww a
3 john rr b
id adminid userid
1 0 1
2 0 2
id name pw
0 admin admin
1 a a
2 b d
the admin and its users can able to insert contact info upto 100 only..
so i am taking the count of admin and those users are created by admin tat count also i am going to take..
so if tot1l=100 then nobody (admin and its users cant able to insert contacts) and simultaneously for other users..
so how to achieve this..
need ur suggestions..