Home > Backend Development > PHP Tutorial > php查询问题

php查询问题

WBOY
Release: 2016-06-20 12:58:44
Original
1053 people have browsed it


输入员工姓名




    
  $link=mysql_connect("localhost", "root","");
  $db  = mysql_select_db("ms_qua");
  mysql_query("set names 'utf8'");
    
  ?>  
  
  

  
  
  
  
  
  
  
  
  
  
 
 if (isset($_POST['submit'])){
 $xingming=$_POST['xingming'];
 $sql="SELECT * FROM qua WHERE xingming=".$xingming."";
 $query=mysql_query($sql);
 while($row=mysql_fetch_row($query))
{

echo '';
foreach($row as $v) 
echo "";
        echo '';
}
 }
?>
求帮助 查询这个弄好几天了 还是出不来= =


回复讨论(解决方案)

php 不是告诉你有错吗?

$sql="SELECT * FROM qua WHERE xingming='$xingming'";$query=mysql_query($sql) or die(mysql_error());
Copy after login

谢谢斑竹 真是每次都帮我这菜鸟= =谢谢@!

序号 部门 岗位 姓名 身份证号码 合同签订时间 证书名称 发证单位 证书编号 发证日期
$v
Related labels:
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