为何只显示一项?

WBOY
Release: 2016-06-20 12:29:41
Original
1114 people have browsed it

自己做了一个招聘网站,普通用户提交了两份简历, 如图中的td表,可是在个人投递简历查询中却只显示最上面第一个职位,没显示其他的。我想要的效果是显示该用户id所投的所以记录。代码如下:

$userid=$_SESSION["userid"];
$sql="select * from person where userid='$userid'";
$query=mysql_query($sql);
$rs=mysql_fetch_assoc($query);
$per_id=$rs["per_id"];
mysql_free_result($query);
?>


          
            
            
            
          

$cx=mysql_query("select * from td where person_id='$per_id'");
while($rs=mysql_fetch_array($cx))
{
?>
          
            
            
            
          
  
  }
  ?>
        
职位 投递人 查看


$cx=mysql_query("select * from job where job_id='".$rs["job_id"]."'");
$myrs=mysql_fetch_assoc($cx);
echo $myrs["title"];
mysql_free_result($cx);
?>


$cx=mysql_query("select * from person where per_id='".$rs["person_id"]."'");
$myrs=mysql_fetch_assoc($cx);
echo $myrs["name"];
mysql_free_result($cx);
?>
" class="text12">查看

      
      
         
      
    
  

下图是失败的显示效果:


回复讨论(解决方案)

我想要的是职位测试员1和测试员2都显示出来,就是不行。麻烦各位大神了!

@zhao4zhong1  @jordan102

@赵4老师 @一起混吧 

查看源码可能已经有两行了,只不过 $cx 变量重复赋值被影响了。

@一起混吧  我也不说废话了,献上90给你了,已经搞掂了!

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!