소스 검색

Fixed:insertRow bugs

Zhu Jinhui 8 년 전
부모
커밋
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();
 	}