Questions about the database in php

Source: Internet
Author: User
Tags php database
About the database in php. this is the database I created. what I want to do is: the front-end user enters the username and password. then I will go to the user_table table, search for items that match username. if they are useless, return. if so, compare the password with the database in php.

This is the database I created.

What I want to do is: the front-end customer enters the username and password, and then I will go to the user_table table to find the matching items with username. if it is useless, it will be returned; if yes, compare the password.

Please write the pseudo code. The PHP database shares the following:
------ Solution --------------------
You only need to use SQL for matching, for example:

SELECT count (*) user_table WHERE username = 'username' AND password = 'password' LIMIT 1


If 1 is returned at this time, it indicates that it has been matched. Otherwise, the user name or password is incorrect.
------ Solution --------------------
I already spoke about it upstairs.
------ Solution --------------------
Reference:
You only need to use SQL for matching, for example:

SELECT count (*) user_table WHERE username = 'username' AND password = 'password' LIMIT 1


If 1 is returned at this time, it indicates that it has been matched. Otherwise, the user name or password is incorrect.

Less from
Select count (*) from user_table where username = "username" and password = "password"
------ Solution --------------------
Reference:
Quote: reference:

You only need to use SQL for matching, for example:

SELECT count (*) user_table WHERE username = 'username' AND password = 'password' LIMIT 1


If 1 is returned at this time, it indicates that it has been matched. Otherwise, the user name or password is incorrect.

What compiler is this? I use Notepad Plus.


This is csdn's own...

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.