mirror of
https://github.com/getnamingo/registry.git
synced 2025-08-04 00:31:50 +02:00
Added host create page
This commit is contained in:
parent
c5a3f7641e
commit
b961dc4e76
6 changed files with 361 additions and 9 deletions
|
@ -50,7 +50,20 @@ class Host
|
|||
|
||||
return $this->db->select($sql, [$id])->fetch();
|
||||
}
|
||||
|
||||
public function getHostByNom($name)
|
||||
{
|
||||
$result = $this->db->select('SELECT id FROM host WHERE name = ?', [$name]);
|
||||
|
||||
if (is_array($result)) {
|
||||
return $result;
|
||||
} else if (is_object($result) && method_exists($result, 'fetch')) {
|
||||
return $result->fetch();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function deleteHost($id)
|
||||
{
|
||||
$this->db->delete('DELETE FROM host WHERE id = ?', [$id]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue