I'm a beginner, I want to take off

Source: Internet
Author: User
I am a newbie, I want to take off the mysql database, c # write programs, c/s structure, createtableuser (idvarchar (10), namevarchar (20) passvarchar (20) isloginvarchar (20) & nbsp; I'm a Cainiao and want to take off
Mysql database, c # written program, c/s structure,

Create table user
(
Id varchar (10 ),
Name varchar (20)
Pass varchar (20)
Islogin varchar (20)
)
Insert into user
Select '01', 'A1' A1'
Insert into user
Select '02 ', 'A2', 'A2 ', '0'
The user content is as follows:
Name pass islogin
A1 a1 1
A2 a2 0

Now I want to write a verification code to verify the user name and password. when the name pass content entered by the a1 user is correct, change islogin to 1 and islogin to 0 by default, indicating that the user has logged on, you cannot log on when you have the same user name. When the user exits, the islogin value is changed to 0.

------ Solution --------------------
Business logic issues do not involve complex SQL statements.
------ Solution --------------------
What's your problem?
------ Solution --------------------
This function should be implemented in your LOGIN code and LOGOUT code. Not implemented in the database.
------ Solution --------------------
If the islogin is detected to be 1 before logon, the system prompts "this account has been logged on. please wait for it to exit ".

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.