这是错误信息:
gengxinshibaiYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '??户名,手机号,邮箱,密码)values('123','122','31','13')' at line 1这是源代码:$cmd="insert into haolang.member(用户名,手机号,邮箱,密码)values('123','122','31','13')";
$data=mysql_query($cmd) or die("gengxinshibai".mysql_error());
echo"更新成功";

解决方案 »

  1.   

    贴出表结构,我们才能看你的sql语句是否正确。
      

  2.   

    Enter password: ********
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 18
    Server version: 5.0.51b-community-nt-log MySQL Community Edition (GPL)Type 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql> use haolang;
    Database changed
    mysql> describe member;
    +--------+-------------+------+-----+---------+-------+
    | Field  | Type        | Null | Key | Default | Extra |
    +--------+-------------+------+-----+---------+-------+
    | 用户名 | varchar(20) | NO   | PRI | NULL    |       |
    | 手机号 | varchar(11) | NO   |     | NULL    |       |
    | 邮箱   | varchar(20) | NO   |     | NULL    |       |
    | 密码   | varchar(20) | NO   |     | NULL    |       |
    +--------+-------------+------+-----+---------+-------+
    4 rows in set (0.03 sec)mysql>这是表结构,再次感谢