php - How to insert value of multiple selectbox in mysql using cakephp -
i'm new cakephp , try store value of multiple select box in mysql
my controller file is:-
$this->model_name->save($this->request->data);
value coming in $this->request->data is:-
array( [model_name] = array( ['field_name'] = array( [0] => 'a', [1] => 'b' ) ) );
i'm using same field name column name stored in database.
tell me how resolve problem.
try savemany()
-
$this->model_name->savemany($this->request->data);