public function getUserId($id)
{
$this->db->query('SELECT * FROM ' . $this->table . ' WHERE id=:id');
$this->db->bind('id', $id);
return $this->db->singleObject(); // return Object Format
}
public function getAllUser()
{
$this->db->query('SELECT * FROM ' . $this->table);
return $this->db->resultSetObject(); // return Object Format
}
public function getUserId($id)
{
$this->db->query('SELECT * FROM ' . $this->table . ' WHERE id=:id');
$this->db->bind('id', $id);
return $this->db->singleJSON(); // return JSON FORMAT
}
public function getAllUser()
{
$this->db->query('SELECT * FROM ' . $this->table);
return $this->db->resultSetJSON(); // return JSON FORMAT
}