$query = "SELECT * FROM student_info WHERE name = '".$login_name."'"; $result = mysql_query($query)$query = "SELECT * FROM student_info WHERE name = '".$login_name."'";\x05$result = mysql_query($query) or die("Could not execute query.");WHERE name =

来源:学生作业帮助网 编辑:作业帮 时间:2024/12/01 20:30:13
$query =

$query = "SELECT * FROM student_info WHERE name = '".$login_name."'"; $result = mysql_query($query)$query = "SELECT * FROM student_info WHERE name = '".$login_name."'";\x05$result = mysql_query($query) or die("Could not execute query.");WHERE name =
$query = "SELECT * FROM student_info WHERE name = '".$login_name."'"; $result = mysql_query($query)
$query = "SELECT * FROM student_info WHERE name = '".$login_name."'";
\x05$result = mysql_query($query) or die("Could not execute query.");
WHERE name = '".$login_name."'" 我不把这些打上的话.result会运行前半段.有了where后就是不执行这个语句了.

$query = "SELECT * FROM student_info WHERE name = '".$login_name."'"; $result = mysql_query($query)$query = "SELECT * FROM student_info WHERE name = '".$login_name."'";\x05$result = mysql_query($query) or die("Could not execute query.");WHERE name =
一、不执行这个语句是什么意思?MySQL错误?还是没有记录?
把$result = mysql_query($query) or die("Could not execute query.");改成
$result = mysql_query($query) or die(mysql_error());
看看MySQL报什么错.
二、把$query = "SELECT * FROM student_info WHERE name = '".$login_name."'";
打印出来看看有没有问题,
echo $query = "SELECT * FROM student_info WHERE name = '".$login_name."'";
如果不能目视出错误,把它放在mysql命令里面查询一下看看,报什么错.如果不报错,说明没有问题,应该是没有该条记录.