虽然没有错误,但在搜索特定搜索时不记录 [英] record not diplaying while searching for specific search although no error
本文介绍了虽然没有错误,但在搜索特定搜索时不记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要检索学生的类别明智的数据,但不知道我在哪里停留。
这里是我的代码。我的配置文件包含数据库连接性
i need to retrive category wise data of students bt dont know where im stuck .
here is my code. my config file contain database conectivity
include('config.php');
$st = "select * from student";
$result = mysql_query($st);
$cat = "SC";
echo "<table><tr><td>Fname</td><td>Mname</td><td>Lname</td><td>Category</td></tr>";
while($array = mysql_fetch_array($result))
{
echo " ".$array['Category'];
echo "<br>";
echo "String cat=".$cat." ";
$match = strcasecmp($st ,$array['Category']);
echo $match;
if($match)
{
echo "<tr><td>".$array['FName']."</td>";
echo "<td>".$array['MName']."</td>";
echo "<td>".$array['LName']."</td>";
echo "<td>".$array['Category']."</td>";
}
}
推荐答案
st = select * from student;
st = "select * from student";
result = mysql_query(
result = mysql_query(
st);
st);
这篇关于虽然没有错误,但在搜索特定搜索时不记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文