Answers for "database interaction in codeigniter"

PHP
0

database interaction in codeigniter

<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class ActiveRecordController extends CI_Controller {
    public function store_order(){
        $data = [
            'date' => '2018-12-19',
            'customer_name' => 'Joe Thomas',
            'customer_address' => 'US'
        ];

        
        $this->db->insert('orders', $data); 

        echo 'order has successfully been created';
    }
}
Posted by: Guest on May-12-2020
0

database interaction in codeigniter

$route['ar/insert'] = 'activerecordcontroller/store_order';
Posted by: Guest on May-12-2020

Code answers related to "database interaction in codeigniter"

Browse Popular Code Answers by Language