Specify a few column types
This commit is contained in:
parent
a7cd0db9a0
commit
5d9db66a2f
BIN
database.mwb
BIN
database.mwb
Binary file not shown.
@ -15,7 +15,7 @@ class Component implements JsonSerializable {
|
||||
$this->componentid = $componentid;
|
||||
if (Component::exists($componentid)) {
|
||||
$this->exists = true;
|
||||
$this->component = $database->get("components", ["machineid", "serial", "typeid", "tested", "capacity", "model", "price", "manufacturer", "publicnotes", "privatenotes"], ["compid" => $componentid]);
|
||||
$this->component = $database->get("components", ["machineid", "serial", "typeid [Int]", "tested", "capacity", "model", "price [Number]", "manufacturer", "publicnotes", "privatenotes"], ["compid" => $componentid]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,8 +20,8 @@ class Machine implements JsonSerializable {
|
||||
$this->machineid = $machineid;
|
||||
if (Machine::exists($machineid)) {
|
||||
$this->exists = true;
|
||||
$this->machine = $database->get('machines', ['type', 'model', 'condition', 'price', 'os', 'serial', 'manufacturer', 'clientid', 'privatenotes', 'publicnotes'], ['machineid' => $machineid]);
|
||||
$typeinfo = $database->get("machine_types", ["machinetypeid (id)", "typename (label)", "icon"], ["machinetypeid" => $this->machine["type"]]);
|
||||
$this->machine = $database->get('machines', ['type [Int]', 'model', 'condition [Number]', 'price [Number]', 'os', 'serial', 'manufacturer', 'clientid [Int]', 'privatenotes', 'publicnotes'], ['machineid' => $machineid]);
|
||||
$typeinfo = $database->get("machine_types", ["machinetypeid (id) [Int]", "typename (label)", "icon"], ["machinetypeid" => $this->machine["type"]]);
|
||||
$this->icon = $typeinfo["icon"];
|
||||
$this->typeid = $typeinfo["id"];
|
||||
$this->typelabel = $typeinfo["label"];
|
||||
|
Loading…
x
Reference in New Issue
Block a user