你可以从这几个方面来想:
1、你是否安装了mysql
2.这段程序很明显的问题就是$host,$user,$password没有设置,

解决方案 »

  1.   

    错在使用mysql_db_query(),建议使用mysql_select_db()+mysql_query()
    因为这个函数在php4.0.6以上就不推荐使用<?php
    mysql_connect($host,$user,$password);
    mysql_select_db("database");
    $result = mysql_query("select * from table");
    while($row = mysql_fetch_array($result)) {
      echo $row["user_id"];
      echo $row["fullname"];
    }
    ?>
      

  2.   

    <?php
    mysql_connect($host,$user,$password);
    mysql_select_db("database");  //少句这个
    $result = mysql_db_query("select * from table");
    while($row = mysql_fetch_array($result)) {
      echo $row["user_id"];
      echo $row["fullname"];
    }
    mysql_free_result($result);
    ?>
      

  3.   

    贴错了
    <?php
    mysql_connect($host,$user,$password);
    mysql_select_db("database");  //少句这个
    $result = mysql_query("select * from table");
    while($row = mysql_fetch_array($result)) {
      echo $row["user_id"];
      echo $row["fullname"];
    }
    mysql_free_result($result);
    ?>
      

  4.   

    在$result = mysql_query("select * from table");
    后加上句echo $result;看什么结果,贴出来,
      

  5.   

    谢谢,我改成两位写的就对了vivanboy(我是谁?) :
    你好,你是不是老在这里逛呀,我的问题好像都会来回答的嘛!
    以后继续帮我呀!:)
      

  6.   

    是吗,我很荣幸哟!
    最近没事情做就来灌水镇点分,hehe
      

  7.   

    vivanboy(我是谁?) :我也和你一样,最近没事情做,来灌水赚点分的!知音也!
      

  8.   

    对了,常见老兄,vivanboy(我是谁?) ,你突飞猛进,比我聪明多了,以后,你可得帮我呵,