我用password加密,能够成功,如下:
insert into xxx (a ,x) values(password(’1‘) , ‘dd’)但我这么查询却没有结果集:
select * from xxx where a=password('1') 头大了!
希望大家能够帮我解决一下!谢谢!
insert into xxx (a ,x) values(password(’1‘) , ‘dd’)但我这么查询却没有结果集:
select * from xxx where a=password('1') 头大了!
希望大家能够帮我解决一下!谢谢!
select * from xxx where a=@a就可以了
Empty set (0.00 sec)mysql> create table aa (a varchar(255), b varchar(255));
Query OK, 0 rows affected (0.04 sec)mysql> insert into aa values (password('1'), '1');
Query OK, 1 row affected (0.03 sec)mysql> select * from aa;
+------------------+------+
| a | b |
+------------------+------+
| 606717496665bcba | 1 |
+------------------+------+
1 row in set (0.00 sec)mysql> select * from aa where a = password('1');
+------------------+------+
| a | b |
+------------------+------+
| 606717496665bcba | 1 |
+------------------+------+
1 row in set (0.00 sec)mysql>