I want save multiple records using dbsave
All records are into a model and is running OK. Dbsave save all records correctly.
But i would like to put a WHERE clausule like this.
where myformfiled = 1
Is posible?
I put in dbsave
<?php return array('em_validado' => 1; ?>
But is not tunning.
em_validado is a checkbox field to select if I save or NO the record.
the complete name is form->data['mail']['em_validado']
Thomas
All records are into a model and is running OK. Dbsave save all records correctly.
But i would like to put a WHERE clausule like this.
where myformfiled = 1
Is posible?
I put in dbsave
<?php return array('em_validado' => 1; ?>
But is not tunning.
em_validado is a checkbox field to select if I save or NO the record.
the complete name is form->data['mail']['em_validado']
Thomas
Hi Thomas,
If you only want to save the value when the box is checked then please use an Event Switcher action
Add an event switcher, set the event list to db_save; Save the action, re-open it and set the Event list.
Add PHP to check the checkbox value, if it is set return 'db_save';
Add the DB Save action to the db_save event in the Event Switcher.
Bob
If you only want to save the value when the box is checked then please use an Event Switcher action
Add an event switcher, set the event list to db_save; Save the action, re-open it and set the Event list.
Add PHP to check the checkbox value, if it is set return 'db_save';
Add the DB Save action to the db_save event in the Event Switcher.
Bob
The checkbox is for each row.
sample:
[0] field values checkbox false
[1] field values checkbox true
[2] field values checkbox false
[3] field values checkbox true
only dbsave [1] and [3] only
sample:
[0] field values checkbox false
[1] field values checkbox true
[2] field values checkbox false
[3] field values checkbox true
only dbsave [1] and [3] only
Hi ideagrup,
The same method will work, just that the code to check is a little longer.
Bob
The same method will work, just that the code to check is a little longer.
Bob
This topic is locked and no more replies can be posted.