PHP Query database table problems
<title>Student Project Enquiry</title>
##################### #学生查询所选课题 ##########################
Include "config.php";
Include "header.php";? >
if ($search)
{
if ($xuehao = = "")
{
EchoPlease fill in your school number!
";
echo "
";
Exit
}
$query = "SELECT * from $student _table where xuehao= ' $xuehao '";
mysql_query ("Set names ' gb2312 '");
$result =mysql_query ($query);
$row =mysql_fetch_array ($result);
if ($row ==0)
{
EchoYou have not registered, or your input is wrong, please re-enter!
";
echo "
";
Exit
}
$query = "SELECT ID as SM from $student _table where xuehao= ' $xuehao '";
mysql_query ("Set names ' gb2312 '");
$result =mysql_query ($query);
$row =mysql_fetch_array ($result);
if ($row [sm]==0)
{
EchoYou have not selected the topic, please go to the topic!
";
echo "
";
Exit
}
?>
student number
Student name |
topic name |
Instructor | TD width= "height=" bgcolor= "#FFFFFF" > title
!--? $n = 0; $query =mysql_query ("select * from $jiaoshi _table, $student _table where $jiaoshi _table.id= $student _table.id and $ student_table.xuehao= ' $xuehao ');