Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Badcontroller extends CI_Controller {
- public function do_save()
- {
- $orderdetails = [
- ['item_id' => 1, 'item_name' => 'Product ABC', 'qty' => 1, 'price' => 500, 'subtotal' => 500],
- ['item_id' => 2, 'item_name' => 'Product DEF', 'qty' => 2, 'price' => 100, 'subtotal' => 200]
- ];
- foreach ($orderdetails as $orderdetail) {
- $this->db->insert('orderdetails', $orderdetail);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement