Update using WHERE |
We had better clarify everything.
So, in your controller : Code: $activity_id = xyz-whatever; Your model : Code: public function lets_update_id($data, $activity_id){ That should work. (01-20-2022, 08:38 AM)BilltheCat Wrote:(01-20-2022, 08:02 AM)sevmusic Wrote: Yes. All fields are in $allowedFields. It gave me this: Quote:SELECT * FROM `billing_charges_2` WHERE `activity_id` = 8583 (01-20-2022, 11:53 AM)demyr Wrote: We had better clarify everything. YOU NAILED IT! This query builder has been the most confusing part of Ci4. All my model functions (except for this one) works as expected. I don't care why at this point. THANK YOU!!!!!
Glad to see that it worked @savemusic. Happy for you.
Actually, it is not so confusing. Try to do most of your work not in modals. Controllers or Libraries are better places to prepare your data, then send them to modals for the final touch.
This code worked.
Result: UPDATE `test` SET `activity_id` = NULL WHERE `activity_id` = 100 Model: PHP Code: <?php Controller: PHP Code: <?php |
Welcome Guest, Not a member yet? Register Sign In |