Android Question MULTIPLE ACCOUNT

Gandy5

Member
I am creating a church app that allows a user to register an account and login into the account. In the dashboard the logged in user is supposed to register himself as a member then save the record in the database.
How do i design my database and query the database so that the user after every return to his account will have his records displayed. at the same time have a record of all members registered.

Thanks for your help in advance.
 

MarkusR

Well-Known Member
Licensed User
Longtime User
for user table
UserId
Name
PasswordHash
Mail
Address
Phone
DateCreated
DateModified
Enabled

id fields are typically auto increment.

other tables with his records can have a reference to UserId as filter

u are using a remote database?
 
Upvote 0

Gandy5

Member
for user table
UserId
Name
PasswordHash
Mail
Address
Phone
DateCreated
DateModified
Enabled

id fields are typically auto increment.

other tables with his records can have a reference to UserId as filter

u are using a remote database?
please what is the "Enabled" for?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
please what is the "Enabled" for?
user is enabled or not.

It ALL depends on YOUR requirements... Define all the fields you need.
 
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime User
Thank you..Please can i get a query example for how to retrieve the data from the database whenever the user logs in.

the basic query is
SELECT fieldname1,fieldname2 or * for all
FROM tablename
WHERE condition as example UserId=?
ORDER BY fieldname

the ? will be replaced by a argument which you gave the Query Method separate.
 
Upvote 0
Top