Topic: Multitable Q
I've got these tables with fields listed below:
users
====
id
username
password
email
alias
sessionid
sessionexpire
bank access
=========
id
user_id
bank_implant_id
bank_cluster_id
implant bank
=========
id
bankname
implant_id
implant_ql
reserved_by
cluster bank
=========
id
bankname
cluster_id
cluster_ql
reserved_by
The table named 'bank access' regulates which respective bank id's.
When i log in to the site with my user, i want to check the bank access table so i know which bank's i'm allowed to view (i'm gonna make one drop-list for the implant bank, and another for the cluster bank).
How would such a SQL look like?
I'm learning, slow but steady about more complex db-operations, but please explain it so a 5-yr old could understand
Thanks
EDIT: Or is it perhaps better to make one acces-table for the implant-bank and one for the cluster-bank?
The more i think abour it it makes more logic to have separate access-tables but should work with only one too if i store the bank-id's in a |-separated list that i use as an array or something...