mysql - 为什么这条语句查询结果会显示不全?
PHP中文网
PHP中文网 2017-04-17 13:40:18
0
3
448
PHP中文网
PHP中文网

认证0级讲师

reply all(3)
黄舟

I am wondering if it may be caused by the following problems:

WHERE username LIKE 'sbboy' OR email LIKE 'sbboy@%';

There is a fixed value 'sbboy' after username. Why do you still like fuzzy matching? Just use "="

mysql> SELECT username,email,password FROM t_u_e_p_csdn_net WHERE username ='sbboy' OR email LIKE 'sbboy@%'\G;

The following is the second edit

==! , I think this issue can be put aside for a while. What I want to say now is yes! ! ! The password field in your user table is not encrypted? ! Still want to make the same mistake as CSDN? ! Who dares to use your business? ! !

The following is the third edit

Sorry, let me edit it again. I accidentally saw something just now. Your table name is t_u_e_p_csdn_net. I was wrong and you win! Continue to 51cto or Blog Park.

The following is the fourth edit

In addition, the results of my execution in SQL Fiddle are normal.
sql execution results

迷茫

password should be a keyword, so that may cause this problem

大家讲道理

Perhaps you can look at the more detailed usage of distinct

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template