![]() |
I have the following code:
PHP Code: foreach($sales_taxes as $line => $sales_tax) This will reassign the $builder in each iteration of the loop. Is that needed? I don't fully understand how and when the $builder is reset. If I were to call the below code instead would it still run an insert in each iteration? PHP Code: $builder = $this->db->Table('sales_taxes'); |
Messages In This Thread |
CI4 $this-db->Table() inside foreach or outside - by objecttothis - 11-04-2021, 02:08 AM
RE: CI4 $this-db->Table() inside foreach or outside - by manager - 11-04-2021, 06:24 AM
RE: CI4 $this-db->Table() inside foreach or outside - by objecttothis - 11-04-2021, 06:59 AM
RE: CI4 $this-db->Table() inside foreach or outside - by manager - 11-04-2021, 11:10 AM
RE: CI4 $this-db->Table() inside foreach or outside - by objecttothis - 11-04-2021, 11:31 AM
RE: CI4 $this-db->Table() inside foreach or outside - by manager - 11-04-2021, 10:19 PM
RE: CI4 $this-db->Table() inside foreach or outside - by objecttothis - 11-04-2021, 10:45 PM
RE: CI4 $this-db->Table() inside foreach or outside - by manager - 11-05-2021, 11:56 AM
RE: CI4 $this-db->Table() inside foreach or outside - by includebeer - 11-05-2021, 03:10 PM
RE: CI4 $this-db->Table() inside foreach or outside - by InsiteFX - 11-06-2021, 01:17 AM
|