用的数据库是                  mysql

解决方案 »

  1.   

    update apple set `comment`='xxx' where name='aa'
      

  2.   

    set 后面接双引号还是单引号啊?
      

  3.   

    (以下为完整代码,我不知道错在哪?好像是语法上的引号问题) <?
    session_start();
    if(isset($_SESSION['nowuser'])){
    $username= $_SESSION['nowuser'];    
    $reason=$_POST['reason'];//检查表单
    if(strlen($reason) >0){ $sql = "select * from module1 where username='".$username."' "; 
    update reason set `comment`='$reason' where name='$username';
    $sql = "INSERT INTO module1(reason)VALUES('reason')";
    if(mysql_query($sql,$conn))
        exit('提交成功!);
    else
         echo"提交失败!";
    }else{
    exit('请填写完空白处再进行提交!<a href="javascript:history.back(-1);">返回</a>');}}else{
         exit('未登入!<a href="login.html">返回</a>');
    ?>