0
$data['list'] = $this->adminModel->where('nip', $nip)->first();

or

$data['list'] = $this->adminModel->where('nip', $nip)->find();

$nip is admin code unique, not primary key

ViLar
  • 1,054
  • 10
  • 18
  • The answer to this post should explain it - https://stackoverflow.com/questions/64116186/codeigniter-4-models-find. For these kinds of questions it's good practice to dig through the CodeIgniter User Guide. – TimBrownlaw Nov 25 '20 at 13:28
  • What do you mean by "the best"? – Nico Haase Nov 26 '20 at 07:54
  • Does this answer your question? [CodeIgniter 4 Models->find()](https://stackoverflow.com/questions/64116186/codeigniter-4-models-find) – Don't Panic Nov 26 '20 at 09:18

0 Answers0