查询代码
$sql = "SELECT * FROM record where bumen like'%$bumen' and keduimokuai like '%$keduimokuai' and keti like '%$keti' and xingming like'%$xingming%'"; $result = mysql_query($sql); ?> <div style="margin:0 auto; width:100%; padding-top:10px;"> <b class="tableTitle"><a id="a">表名:培训台账查询</a></b><br /> <a href="search.html" id="fanhui"><b>返回</b></a> </div> <table width="100%" border="1"> <tr class="biaotou"> <td width="35">序号</td> <td width="60">部门</td> <td width="60">科队/模块</td> <td width="50">姓名</td> <td width="80">培训时间</td> <td width="150">培训课题</td> <td width="250">培训心得</td> </tr> <?php while($row = mysql_fetch_row($result)) { echo '<tr>'; foreach($row as $v) echo "<td>$v</td>"; echo '</tr>'; } ?> </table>
$count=mysql_num_rows($result);