Answer the question
In order to leave comments, you need to log in
How to make a record in two database tables in one method?
The method has actions for writing first to one database table, then to another.
Saves to only one of them. How to make it so that it was in both.
Example:
$operations1 = new Operations();
$operations1 ->user = "Ivan";
$operations1 ->login = "Ivanov";
$operations1->save();
$moreAction= new moreAction();
$moreAction->property1 = "Prop1";
$moreAction->property2 = "Prop2";
$moreAction->save();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question