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 no, return. If yes, compare the password. Please write the pseudo code. database problems 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 pseudo code;
PHP database
Share:
------ 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...