cfmgrv4 init...3

This commit is contained in:
최준흠 2024-10-16 14:24:50 +09:00
parent 3a69193a9d
commit 61e3bdd5bd
2 changed files with 5 additions and 4 deletions

View File

@ -63,7 +63,7 @@ class ZoneModel extends CommonModel
case "content": //create form에서 사용
$rule = "required|trim|string";
break;
case "proxied": //create form에서 사
case "proxied": //create form에서 사
$rule = "required|in_list[on,off]";
break;
default:
@ -132,8 +132,9 @@ class ZoneModel extends CommonModel
//Subquery 방식사용
$recordModel = new RecordModel();
$recordModel->like(RecordModel::TABLE . '.content', $word, 'both');
$zone_uids = $recordModel->select(RecordModel::PARENT)->findAll();
$zone_uids = array_column($zone_uids, RecordModel::PARENT);
$recordModel->orlike(RecordModel::TABLE . '.' . RecordModel::TITLE, $word, 'both');
$recorde_entitys = $recordModel->select(RecordModel::PARENT)->findAll();
$zone_uids = array_column($recorde_entitys, RecordModel::PARENT);
parent::setList_WordFilter($word, $field);
$this->orWhereIn(self::TABLE . '.' . self::PK, array_values($zone_uids));
}

View File

@ -211,7 +211,7 @@ abstract class CommonModel extends Model
//List용
final public function setList_FieldFilter(string $field, int|string $value): void
{
$this->where($field, $value);
$this->where($this->getTable() . '.' . $field, $value);
}
public function setList_WordFilter(string $word, string $field = null): void
{