Minahito
minah****@users*****
2006年 11月 11日 (土) 18:17:45 JST
Index: xoops2jp/html/modules/legacy/kernel/handler.php diff -u xoops2jp/html/modules/legacy/kernel/handler.php:1.1.2.2 xoops2jp/html/modules/legacy/kernel/handler.php:1.1.2.3 --- xoops2jp/html/modules/legacy/kernel/handler.php:1.1.2.2 Sun Oct 15 01:37:52 2006 +++ xoops2jp/html/modules/legacy/kernel/handler.php Sat Nov 11 18:17:45 2006 @@ -199,11 +199,11 @@ $arr = $this->_makeVars4sql($obj); foreach($arr as $_name => $_value) { - $fields[]=$_name; - $values[]=$_value; + $fields[] = "`${_name}`"; + $values[] = $_value; } - $sql = @sprintf("INSERT INTO " . $this->mTable . " ( %s ) VALUES ( %s )", implode(",", $fields), implode(",", $values)); + $sql = @sprintf("INSERT INTO `" . $this->mTable . "` ( %s ) VALUES ( %s )", implode(",", $fields), implode(",", $values)); return $sql; } @@ -219,14 +219,14 @@ foreach ($arr as $_name => $_value) { if ($_name == $this->mPrimary) { - $where = "${_name}=${_value}"; + $where = "`${_name}`=${_value}"; } else { - $set_lists[] = "${_name}=${_value}"; + $set_lists[] = "`${_name}`=${_value}"; } } - $sql = @sprintf("UPDATE " . $this->mTable . " SET %s WHERE %s", implode(",",$set_lists), $where); + $sql = @sprintf("UPDATE `" . $this->mTable . "` SET %s WHERE %s", implode(",",$set_lists), $where); return $sql; }