codeigniter-base-model
codeigniter-base-model copied to clipboard
⛔️DEPRECATED CodeIgniter base CRUD model to remove repetition and increase productivity
Hi all; Now How can I get per page of articles using MY_Model?Does MY_Model support pagination right now? thanks!
EDIT LINE 21: CHANGE protected $_table; TO protected $_prefix = ''; protected $_table; LINE 851 NEW fetch_table: ``` /** * Guess the table name by pluralising the model name */...
I'm attempting to join a table with itself and not sure where I'm going wrong. I'm trying to join the users table with itself so that I can get the...
I ran into this problem using a get_by on an empty table for a model that has an after_get observer. I fixed it by if ($row) $row = $this->trigger('after_get', $row);...
I've been trying to use base model for models under a certain path, Eg., /models/cm/city_model.php :: class City_model extends MY_Model { public $_table = 'temp_city'; public $primary_key = 'city_code'; public...
Is it possible to return only one field so that something like this works? ``` $this->tagline = $this->setting->get_by(array('name' => 'tagline'))->select('value'); ```
I've tried relating a model to itself by having parent => child relations, for example: - Parent Category has many Child Categories - Child Categories belongs to a Parent Category...
When I load two different models in a controller, the methods within the first model added aren't functioning correctly. EG ``` php $this->load->model('currency_model'); $this->load->model('country_model'); $countries = $this->country_model->get_all(); $currencies = $this->currency_model->get_all();...
Hiya. Is there a way to get MY_Model to allow composite primary keys? Currently i'm having to override a bunch of the default functions, and it seems like there ought...
Hi, I just started to use the library and noticed that the "protected_attributes" array can be set but it does not appear to be used. For example, I set: $this->protected_attributes...