Welcome Guest, Not a member yet? Register   Sign In
Database Question
#1

[eluser]xerobytez[/eluser]
Hey guys, I'm working on a project that has some heavy duty database operations and sql queries are not my strong area. I'm trying to find the best way to handle the login for my app but heres my basic table layout.

[table:ct_accounts]
account_id
account_group_id
account_company
account_signup_timestamp
account_signup_ip
account_status

[table:ct_account_users]
user_id
user_account_id
user_username
user_password
user_title
user_signup_timestamp
user_signup_ip
user_status

[table:ct_account_groups]
group_id
group_name
group_status

So when a user logs in I check their credentials with ct_account_users, if successful I then need to get the associated account via user_account_id from ct_accounts, then if thats successful I need to get the correct group via account_group_id from ct_account_groups. What is the best way to go about this?

Thanks for reading




Theme © iAndrew 2016 - Forum software by © MyBB