mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
修正Model类的delete方法
This commit is contained in:
@@ -1227,10 +1227,10 @@ abstract class Driver
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 得到完整的数据表名
|
* 得到完整的数据表名
|
||||||
* @access protected
|
* @access public
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function getTableName()
|
public function getTableName()
|
||||||
{
|
{
|
||||||
if (!$this->table) {
|
if (!$this->table) {
|
||||||
$tableName = $this->config['prefix'];
|
$tableName = $this->config['prefix'];
|
||||||
@@ -2050,7 +2050,7 @@ abstract class Driver
|
|||||||
if (is_string($pk)) {
|
if (is_string($pk)) {
|
||||||
// 根据主键查询
|
// 根据主键查询
|
||||||
if (is_array($data)) {
|
if (is_array($data)) {
|
||||||
$where[$pk] = ['in', $data];
|
$where[$pk] = isset($data[$pk]) ? $data[$pk] : ['in', $data];
|
||||||
} else {
|
} else {
|
||||||
$where[$pk] = strpos($data, ',') ? ['IN', $data] : $data;
|
$where[$pk] = strpos($data, ',') ? ['IN', $data] : $data;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user