php怎么能把数据库里的数据自动调用到网页上显示出来

  • 时间:
  • 浏览:2
  • 来源:彩神大发11选5_神彩大发11选5官方

  //$result是记过集好不好,还没有你的输出呢?echo?

  本来我

  $result=mysql_query('select name from tag_cate where id=3');mysql_close($con);

  }

  $result=mysql_query('select name from tag_cate where id=3') or die('ERROR : '.mysql_error());if($result){

  }

  mysql_select_db($database);

  mysql_free_result($result);

  则

  $con = mysql_connect("localhost","root","");mysql_select_db($sql);

  $con = mysql_connect("localhost","root","");mysql_select_db($sql);

  mysql_close($con);

  ?>

  <?php

  还是无内容显示怎么办?sql是数据库名。

  while($row = mysql_fetch_assoc($result)){echo $row['name'].'';

  }

  <?php

  if (mysql_num_rows($result) == 0) {