估计sql语句有问题,或是没连上数据库,或是数据库里没有相关记录

解决方案 »

  1.   

    在你执行mysql_query()时出错拉
    检查你的sql语句,看看有没有错误,可以把你的sql语句放到mysql底下直接执行看看
      

  2.   

    php.ini中register_globals = on
      

  3.   

    也可以在网页头上加上
    extract($_REQUEST);
    extract($_SESSION);
      

  4.   

    用 
      $_POST['...']
      $_GET['...']
      $_SESSION['...']
      

  5.   

    你echo 一下你的查询语句,看看是否正常.$query = "select * from tablename where id='$id'";然后
    echo $query;也可以显示其他的内容,看看什么地方出错,然后修改就可以了,这是个比较简单的办法
      

  6.   

    swsadmin(风) 的这个方法不错,我经常这样检查!!!
      

  7.   

    我现在遇到一样的问题撒
    用echo过没问题
    数据库连接也没有问题,可以把表单记录插入到数据库中,在 mysql_fetch_arrray()时出错
    不知道怎么办,郁闷,
      

  8.   

    我的和junkin的问题差不多,不过我的连差入的时候数据库里面都是空的!!
      

  9.   

    php.ini 中register_globals = on
      

  10.   

    1.#BindAddress * 改为 BindAddress 127.0.0.1 
      #Servername new.host.name 改为 Servername localhost 
    2.让你的APACHE来支持PHP4. 加上下面这么几句: 
      --ScriptAlias /php4/ "C:/php4/" (你的php的安装位置,最好把文件夹的名字改为php4)
      --AddType application/x-httpd-php4 .php 
    --AddType application/x-httpd-php4 .php3 
    --AddType application/x-httpd-php4 .php4 
    --Action application/x-httpd-php4 "/php4/php.exe" 
    3.增加默认启动文档: 
      DirectoryIndex index.html 
      DirectoryIndex index.htm 
      DirectoryIndex index.php 
      DirectoryIndex index.php3 
      DirectoryIndex index.php4