database interaction in codeigniter
$route['ar/insert'] = 'activerecordcontroller/store_order';
database interaction in codeigniter
$route['ar/insert'] = 'activerecordcontroller/store_order';
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';
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us