mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
update thinkphp/library/traits/model/query.php
删除parseSql()函数,此类不再需要了
This commit is contained in:
@@ -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操作
|
||||
|
||||
Reference in New Issue
Block a user