Hi,
I need help on this, i have the code below and i need to save the data to this table. The model is generate by gii and it point to the correct table already, but when i call this controller to it wont insert the data to the table, any ideas? Some others function also have using the save() but it works, anything wrong with my code?
In controller
$modelC2cCustomers = new C2cCustomers;
$C2cCustomersData = array(‘customers_id’=>‘999’, ‘username’=>‘999’,
'buyer_order_level'=>'0', 'seller_group_id'=>'1',
'seller_product_level'=>'0', 'seller_status'=>'1', 'seller_create_listing_permission'=>'0','seller_product_listing_limit'=>'20');
$modelC2cCustomers->insertC2cCustomers($C2cCustomersData);
In the C2cCustomers model
public function insertC2cCustomers($data){
foreach($data as $column => $info){
$this->$column =$info;
}
$this->save()
}