mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-23 08:35:35 +08:00
update value comment
This commit is contained in:
@@ -44,10 +44,12 @@ class SelectBody
|
|||||||
return $this->fetchAll()[0] ?? null;
|
return $this->fetchAll()[0] ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function value() {
|
public function value($key = null) {
|
||||||
$r = $this->fetchFirst();
|
$r = $this->fetchFirst();
|
||||||
if ($r === null) return null;
|
if ($r === null) return null;
|
||||||
return current($r);
|
if ($key === null)
|
||||||
|
return current($r);
|
||||||
|
else return $r[$key] ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function execute() {
|
public function execute() {
|
||||||
@@ -85,4 +87,4 @@ class SelectBody
|
|||||||
}
|
}
|
||||||
return [$msg, $array ?? []];
|
return [$msg, $array ?? []];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user