PHP – CodeIgniter how to create and use a model
Looking at the structure of CodeIgniter we see that there is a folder called application/models. It is in this one that we will create our model. For a model to be usable as such, it must extend CI_Model. class ScoresModel extends CI_Model { function __construct(){ // Call the Model constructor parent::__construct(); $this->load->database(); } function getAllScores(){ … Read more