add param to valueset and valuesetdef

This commit is contained in:
mahdahar 2025-09-18 13:04:36 +07:00
parent 91e1404bcb
commit 8f30704a2b
5 changed files with 15 additions and 7 deletions

View File

@ -17,9 +17,13 @@ class ValueSet extends Controller {
} }
public function index() { public function index() {
$rows = $this->db->table('valueset') $builder = $this->db->table('valueset')->select("*");
->select("*") $param = $this->request->getVar('param');
->get()->getResultArray(); if ($param !== null) {
$builder->like('VValue', $param, 'both');
$builder->orlike('VDesc', $param, 'both');
}
$rows = $builder->get()->getResultArray();
if (empty($rows)) { if (empty($rows)) {
return $this->respond([ return $this->respond([

View File

@ -17,9 +17,13 @@ class ValueSetDef extends Controller {
} }
public function index() { public function index() {
$rows = $this->db->table('valuesetdef') $builder = $this->db->table('valuesetdef')->select("*");
->select("*") $param = $this->request->getVar('param');
->get()->getResultArray(); if ($param !== null) {
$builder->like('VSName', $param, 'both');
$builder->orlike('VSDesc', $param, 'both');
}
$rows = $builder->get()->getResultArray();
if (empty($rows)) { if (empty($rows)) {
return $this->respond([ return $this->respond([

BIN
public/clqms01.sql.gz Normal file

Binary file not shown.

BIN
public/upload/meow.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
public/upload/panda.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB