$query="select passwd from userinfo where WHERE username = '".$username."'";咋有两个“where”?
解决方案 »
- SQL查询中的{}是干什么的?
- 做个类似于寻宝的任务
- 网站频繁出现MySQL server on 'localhost' (10061)错误
- 请教FLEA框架下,如何只查询主表的一个字段
- 无退出,居然也自动退出session了
- 关于字符编码的问题,,,
- php的框架.
- PHP表单数据接收不到!!@@ 急急急急急在线等啊
- 求一正则[只有20分了]
- Use of undefined constant nowsdate - assumed 怎么回事
- PHP5连接ORACLE9的问题
- <param xxx name="src" xxx value="" xxx /> 当name和value位置不确定时,怎么写匹配正则?
mysql_fetch_row(): supplied argument is not a valid MySQL result resourceif($row=mysql_fetch_row($result));
{
$password2 = $row[0];
}
啥东西?查完数据库后如果该用户名存在的话,肯定能返回个非空资源!
用mysql_num_rows($result)看资源是不是空的,空的用户不存在,
非空mysql_fetch_array($result)取出资源的一行在验证你的密码!你基本的都没搞清楚!