新手请问:调用函数时无任何输出结果

WBOY
Release: 2016-06-13 12:30:15
Original
1293 people have browsed it

新手请教:调用函数时无任何输出结果
函数:
function jingdian($dq_id)
{
  $result_jingdian = mysql_query("select count(*) as shuliang from jingdian where jd_diqu=".$dq_id, $con);
  $row_jingdian = mysql_fetch_array($result_jingdian);
  return $row_jingdian["shuliang"];
}
函数是写在整个页面最上面的。

调用:
  while($row = mysql_fetch_array($result))
  {
    echo "

". jingdian($row['dq_id']) ."";   
  }  
  mysql_close($con);
?>
运行时页面没有任何显示。
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