开发者

PASSWORD() function no longer working after server move

开发者 https://www.devze.com 2023-03-12 11:27 出处:网络
I have moved my website and MySQL database to a new, free server at webhost.com, running MySQL 5.0.91-community.

I have moved my website and MySQL database to a new, free server at webhost.com, running MySQL 5.0.91-community.

Already, I have noticed that the MySQL server "does not like" the following query:

SELECT * FROM users_tb WHERE user_name='student' and user_pass=PASSWORD("password_here").

I 开发者_如何转开发have tried it in PhpMyAdmin, where no results are returned. If I leave out the password clause and just search by username, it works.

This code worked on the previous server. What has changed?


PASSWORD behaves differently depending on (1) the version of MySQL, and (2) whether or not the admin has activated old-passwords in my.ini.

0

精彩评论

暂无评论...
验证码 换一张
取 消