"Finalstryke" <fi*********@btopenworld.com> wrote in message
news:bj**********@sparta.btinternet.com...
Hi,
I run a hobby-based hall of fame. At the moment people send their
stats to me and I manually update the database, run the queries, and convert the
results to .pdf which is then put online.
I'm in the process of automating the procedure by changing to a .php
website with the Hall of Fame powered by a mysql database, but what I'm trying to
figure out is if each user has a unique username and password, is it
possible for the database to only allow them to update the records in
table X, Y and Z which their own username / password created (ie, they can't
mess with other players entries)?
I think I could do it by giving each user their own set of mini tables,
but that would make the queries horrendously complicated :o
Thanks,
Finalstryke
Einstein (I believe) once said "Its easy to make things complicated, but
complicated to make things easy"... and... with respect, I think you are
making life complicated on yourself.
You need two tables... one for security, the other with your hall of fame
data.
Give each user their own username/password and a security grade - for
example, make ordinary users level 9 and you (the master) level 0 (zero).
Write that to one table... You have the advantage of having eight other
levels (numbers from 1 to 8) to give some folk that little bit more access
than a level 9 person...
Then... whenever there are to be updates, or reading to be done to your
"Hall of Fame" table, check your security table first to confirm that the
person has the access you've given them.