瀏覽代碼

Fixed:insertRow bugs

Zhu Jinhui 7 年之前
父節點
當前提交
a4679c7f22
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/Driver/Base.php

+ 2 - 2
src/Driver/Base.php

@@ -549,7 +549,7 @@ class Base
 		if (is_array($array)) {
 			$tmpArray = array();
 			foreach ($array AS $k => $v) {
-				$tmpArray['k'][] = $k;
+				$tmpArray['k'][] = $this->setQuote($k);
 				$tmpArray['v'][] = $this->setQuote($v);
 			}
 			$this->fileds = $tmpArray;
@@ -692,7 +692,7 @@ class Base
 	 */
 	final function insertRow($table)
 	{
-		$this->modelSQL = $sql = $this->createInsertSQL($sql);
+		$this->modelSQL = $sql = $this->createInsertSQL($table);
 		$this->setQuery($sql);
 		return $this->lastInsertId();
 	}