CodeIgniter.com - Report problems! |
(03-09-2022, 12:27 AM)InsiteFX Wrote: CodeIgniter 4 uses Events instead of Hooks. So you want to read up on the CodeIgniter 4 Event system. Hello, Thanks for the help, I understand now how it works, but I am trying to get these settings available globally, Code: ErrorException
Please read this.
CodeIgniter 4 User Guide -> Generating Query Results -> Result Arrays What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(03-10-2022, 01:03 AM)InsiteFX Wrote: Please read this. Thanks! I've looking for this for a while now
Report problem is a necessity to monitor and can fix for next time
fleeing the complex
I am not sure that having issue in CodeIgniter 4 or not but I am getting issue to show two times db prefix in query while I use Like. Following is my query. mysqli_sql_exception #1054
$order_status_ids = [14, 21]; $builder = $this->db1->table('order'); $builder->join('order_product', 'order.order_id = order_product.order_id','LEFT'); $builder->Like('order_product.name', $_GET['query']); $builder->whereIn('order.order_status_id', $order_status_ids); $query = $builder->get(); return $query->getResultArray(); Showing query like as below. "ssiegel_" is my db prefix. I am using multi database connection. As you can see that adding two times prefix in like condition [ssiegel_``ssiegel_order_product.name LIKE ] SELECT * FROM ssiegel_order LEFT JOIN ssiegel_order_product ON ssiegel_order.order_id = ssiegel_order_product.order_id WHERE ssiegel_``ssiegel_order_product.name LIKE '%Apple Fiber Powder%' ESCAPE '!' AND ssiegel_order.order_status_id IN (14,21) Any one have solution for this issue or any updates in CodeIgniter 4 to update liabrary. Thanks in advance!
I have primarily been learning Symphony and haven't looked at Code Igniter mainly because there seemed to be a mass consensus that something like Laravel/Symphony etc. would be better but I decided to checkout it again and was pleased with the experience. Its simplicity is a real plus point for me.
|
Welcome Guest, Not a member yet? Register Sign In |