mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
Query类修改 find方法查询不到数据返回 NULL
This commit is contained in:
@@ -1735,7 +1735,7 @@ class Query
|
|||||||
$sql = $this->builder()->select($options);
|
$sql = $this->builder()->select($options);
|
||||||
if($options['fetch_sql']){
|
if($options['fetch_sql']){
|
||||||
// 获取实际执行的SQL语句
|
// 获取实际执行的SQL语句
|
||||||
return $this->connection->getRealSql($sql,$this->bind);
|
return $this->connection->getRealSql($sql, $this->bind);
|
||||||
}
|
}
|
||||||
// 执行查询操作
|
// 执行查询操作
|
||||||
$resultSet = $this->query($sql, $this->getBind(), $options['master'], $options['fetch_class']);
|
$resultSet = $this->query($sql, $this->getBind(), $options['master'], $options['fetch_class']);
|
||||||
@@ -1753,7 +1753,6 @@ class Query
|
|||||||
|
|
||||||
// 返回结果处理
|
// 返回结果处理
|
||||||
if ($resultSet) {
|
if ($resultSet) {
|
||||||
|
|
||||||
// 数据列表读取后的处理
|
// 数据列表读取后的处理
|
||||||
if (!empty($this->model)) {
|
if (!empty($this->model)) {
|
||||||
// 生成模型对象
|
// 生成模型对象
|
||||||
@@ -1821,7 +1820,7 @@ class Query
|
|||||||
$sql = $this->builder()->select($options);
|
$sql = $this->builder()->select($options);
|
||||||
if($options['fetch_sql']){
|
if($options['fetch_sql']){
|
||||||
// 获取实际执行的SQL语句
|
// 获取实际执行的SQL语句
|
||||||
return $this->connection->getRealSql($sql,$this->bind);
|
return $this->connection->getRealSql($sql, $this->bind);
|
||||||
}
|
}
|
||||||
// 执行查询
|
// 执行查询
|
||||||
$result = $this->query($sql, $this->getBind(), $options['master'], $options['fetch_class']);
|
$result = $this->query($sql, $this->getBind(), $options['master'], $options['fetch_class']);
|
||||||
@@ -1861,7 +1860,7 @@ class Query
|
|||||||
throw new DataNotFoundException('table data not Found:' . $options['table'], $options['table'], $options);
|
throw new DataNotFoundException('table data not Found:' . $options['table'], $options['table'], $options);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$data = false;
|
$data = null;
|
||||||
}
|
}
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user