这样可以的。$query = "INSERT INTO 'note' ('id','content') VALUES ('',".$last.")";

解决方案 »

  1.   

    对$last加上单引号,即 '$last' 就可以了。我在MySQL上试过,不知你这里怎么样,就是这个同样的情况,用insert语句。
      

  2.   

    如果你的那个content是数值型的就不用那个‘如果不是你加上就可以用了。$query = "INSERT INTO 'note' ('id','content') VALUES ('','$last')";
      

  3.   

    那就这样。
    $query = "INSERT INTO 'note' ('id','content') VALUES ('','$last')";$query = "INSERT INTO 'note' ('id','content') VALUES ('','".$last."')";不行就看看是不是有不可为空的字段你没有给值。
      

  4.   

    我的content是text型的。
    我最后把那个id和content删掉,即:$query = "INSERT INTO 'note'  VALUES ('','$last')";
    即可了。谢谢。
      

  5.   

    $query = "INSERT INTO note (id, content) VALUES ('','$last')";
    就可以了,字段名是不能加引号的
      

  6.   

    $query = "INSERT INTO 'note' ('id','content') VALUES ('','".$last."')";如果$last中出现'怎么办?不知道可以实现否
    $query = "INSERT INTO note (id, content) VALUES ('','$last')";如果可以的话,最好采用它