mysql关键词

#1 helloniu

function tag_addsave()
      {
        $tbl_articletag = spClass("tbl_articletag");
                $newrow = array(
                        'name' => $this->spArgs('name'),
                        'show' => $this->spArgs('show'),
                        'num' => $this->spArgs('num'),
                );
                $tbl_articletag->create($newrow);
                if ($tbl_articletag)$this->success("资讯TAG添加成功!", spUrl("news","tag_add"));
    }

INSERT INTO tbl_articletag (name,show,num) VALUES ('水水水','0','0')
执行错误: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'show,num) VALUES ('水水水','0','0')' at line 1


这样该如何处理呢

2011-06-16 11:52:25

#2 helloniu

sp的添加机制不加  `show`处理吗

2011-06-16 11:55:06

#3 jake

建表字段建议不要用mysql的关键字。
框架本身也为了形成规范而出现的。

2011-06-16 12:52:36