update thinkphp/library/traits/model/query.php

删除parseSql()函数,此类不再需要了
This commit is contained in:
liuzhaowei55
2015-12-17 10:29:31 +08:00
parent 3393710a2a
commit c2bca247be

View File

@@ -46,28 +46,6 @@ trait Query
return $this->db->rollback();
}
/**
* 解析SQL语句
* @access public
* @param string $sql SQL指令
* @param boolean $parse 是否需要解析SQL
* @return string
*/
public function parseSql($sql, $parse)
{
// 分析表达式
if (true === $parse) {
$options = $this->_parseOptions();
$sql = $this->db->parseSql($sql, $options);
} elseif (is_array($parse)) {
// SQL预处理
$sql = vsprintf($sql, $parse);
} else {
$sql = strtr($sql, ['__TABLE__' => $this->getTableName(), '__PREFIX__' => $this->tablePrefix]);
}
return $sql;
}
/**
* 批处理执行SQL语句
* 批处理的指令都认为是execute操作