I have PHP:
if($post['for']){
foreach($post['for'] as $value){
$saveMsgObjFor->message_id = $save;
$saveMsgObjFor->object_type_id = 4;
$saveMsgObjFor->object_ref_id = $value;
$saveMsgObjFor->object_email = null;
$saveMsgObjFor->save($update);
}
}
But it just save first loop. For twice, it show error:
Statement could not be executed (23000 - 1062 - Duplicate entry
'33' for key 'PRIMARY'
33
is field message_object_id
and it was auto increment
. Help me, please..