Explorar el Código

update base model

Jinhui Zhu hace 7 años
padre
commit
a8d4ad0af8
Se han modificado 1 ficheros con 9 adiciones y 1 borrados
  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;
+	}
 	/**
 	 *
 	 * 查询所有