$query="Select * from authorized_users where name= '$userid' and password='{sha1($password)}'"; ------解决方案-------------------- $query='Select * from authorized_users where name= "'.$userid.'" and password=sha1("'.$password.'")';
语法正确,但可读性不强
$query="Select * from authorized_users where name='$userid' and password=sha1('$password')";
这样是不是清爽些?
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn