Ver código fonte

update base model

Jinhui Zhu 7 anos atrás
pai
commit
a8d4ad0af8
1 arquivos alterados com 9 adições e 1 exclusões
  1. 9 1
      Qii/Driver/Base.php

+ 9 - 1
Qii/Driver/Base.php

@@ -689,7 +689,15 @@ class Base
 		$this->cleanData();
 		return $this->getOne($sql);
 	}
-
+	/**
+	 * 创建SQL
+	 */
+	final function createSQL($table)
+	{
+		$sql = sprintf($this->_query['SELECT'], ((trim($this->fields) != '') ? $this->fields : "*"), $table) . $this->where . $this->groupBy . $this->orderBy . $this->limit;
+		$this->cleanData();
+		return $sql;
+	}
 	/**
 	 *
 	 * 查询所有