CodeIgniter-MY_Model
CodeIgniter-MY_Model copied to clipboard
Base model (MY_Model) for the Codeigniter framework.
when im using my model with oracle database update it gives an error MY_Model: Unknown column (CODE) in table: (SYS_MENU). But When I use Ci Query Builder, It works fine.
I made a simple one-many relationship and encounter an error as follows: ``` Error Number: 1054 Unknown column 'tdz_`standard_design.dress_mode_id' in 'field list' SELECT `tdz_``standard_design`.`dress_mode_id`, `tdz_``standard_design`.`price` FROM `tdz_standard_design` WHERE `tdz_standard_design`.`dress_mode_id` IN('1')...
Starting off simple, I would like to do some additional operations when an item's status is being updated. To do this I have added a `before_update` observer to a method...
Hi, Just quick question on Pivot, can MY_Model PIVOT functionality doing something like this or I need to use raw sql statement to achieve it? Sample question from SO :...
Hi, I have a Role mode linked with a Subcategory model through a pivot table. In my Role model, I have : ``` $this->has_many_pivot['subcategories'] = array( 'foreign_model'=>'Subcategories_model', 'pivot_table'=>'app_menus_app_userroles', 'local_key'=>'id', 'pivot_local_key'=>'app_menu_id',...
I have 4 tables... vehicles, service_logs, items, receipts I want to pull a vehicle along with all it's service logs and all of the service log's items and receipts. A...
Good day, I'm trying to filter item_name in related table tbl_assets but it's not working. ``` $postData = $this->input->post(); $itemID = $postData["item_id"]; $itemName = $postData["item_name"]; $unitCenter = $postData["unit_center_id"]; $categoryID =...
In the original MY_Model we can use the prep_form($id) to populate the form when we want update a record. Now we can use the validation library to do this without...
HI. Could anybody please tell me how to use **after_get** observer when getting data through **get_all()** and return type as **"array".** after_get observer only works with **get()** otherwise **Undefined index:...
previous version would allow arrays "bigger" than the table, e.g. ignore extra fields of submit-buttons. after upgrade i have to manually unset($updateArray['submitBtn']) otherwise it will throw MY_Model: Unknown column (submitBtn)...