Hi.
I've got form with few params. I would like run query(insert) for each of this params(its an array in fact). I have no idea how to implement this, I think it'll be somethin like this:
function beforeCreate(){
foreach($this->get('action') as $action){
//insert some data
}
//and dont insert "main" query
}
I'm affraid, You'll don't understand me, so I'll write it once again:
when I'm adding my data(it's "normal" scaffold") - I would like to run one query for each checkbox checked in form -and only for them(so I would like to avoid to run default query, which will be run with save() function )
run one query for each checkbox checked in form
so a new record for each checkbox.
Are those checkbox records associated (belongs_to) another model?
so a new record for each checkbox.
well, in fact- yes :)
Are those checkbox records associated (belongs_to) another model?
No, actually, it looks like this: -some data I'm adding via normal inputs. -few checkboxes are generated form explode(',',$data_from_xml_file)
Create a memo field and store the checked options as a serialized array
well... it's very good idea, thanks ;)
1 to 5 of 5