I have a project based on accounting system. I have a table Sales
. However, when the user sign up, he/she is redirected to the sign in page. From there, they can log in into their account.
How am I going to prevent several users when they sign in not to share the same data? How am I going to separate that data for each one of them?
Take at look at this. I have the following tables:
Users
table
- Uid
- Name
- Password
- Confirm Password
Sales
table
- Uid
- Product
- Rate
- Quantity
- Total
I have related Uid in the sales
table to the Uid column in the users
tables. When I load the user's account page, I want to execute code written in T-SQL or C# on the page load that can call the SQL commands to read the user's Uid from users table and select the corresponding data saved by that user on the sales table to separate the data that are saved by other users.
I have researched but I did not get a solution clearly even from the forum. I want someone please not to tell me but to show me step by step with the codes on how I am going to archive this?
Please can somebody help me? Am really stacked. :(