mirror of
https://codeberg.org/vlw/scaffold.git
synced 2025-11-05 06:02:42 +01:00
fix: replace for() with from() in database Model
This commit is contained in:
parent
1940d89352
commit
3dab5f061b
1 changed files with 7 additions and 7 deletions
|
|
@ -55,7 +55,7 @@
|
|||
|
||||
$this->_resolved = true;
|
||||
$this->_row = $this->db
|
||||
->for($this->table)
|
||||
->from($this->table)
|
||||
->where($this->where)
|
||||
->limit(1)
|
||||
->select($this->columns)
|
||||
|
|
@ -75,11 +75,11 @@
|
|||
public bool $isset {
|
||||
// Returns bool if row is set or attempts to resolve and set if null
|
||||
get => $this->_isset ??= new Database()
|
||||
->for($this->table)
|
||||
->where($this->where)
|
||||
->limit(1)
|
||||
->select()
|
||||
->num_rows === 1;
|
||||
->from($this->table)
|
||||
->where($this->where)
|
||||
->limit(1)
|
||||
->select()
|
||||
->num_rows === 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -103,7 +103,7 @@
|
|||
$this->_row[$key] = $value;
|
||||
|
||||
return $this->db
|
||||
->for($this->table)
|
||||
->from($this->table)
|
||||
->where($this->where)
|
||||
->update([$key => $value]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue