Home > Backend Development > PHP Tutorial > sql语句正确但找不到记录

sql语句正确但找不到记录

WBOY
Release: 2016-06-23 14:13:18
Original
1029 people have browsed it

SQL PHP

php代码:

运行结果:

数据库存在符合条件的记录:

这是什么原因?

回复讨论(解决方案)

为什么不echo result1的sql语句

mysql的语句里面的 email和password 的双引号和那个点去掉

没有看到你连接数据库的代码!

贴出全部代码看看。

请把sql语句中的key用短引号括起来

"Select uname From user WHERE email = '".$email."' AND `key` = '".$password."'"
Copy after login

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template