Commit 4d4a3f08 by Sorokin Victor

Update MessageController.php

parent eba9049b
...@@ -201,10 +201,10 @@ class MessageController extends Controller ...@@ -201,10 +201,10 @@ class MessageController extends Controller
$db->createCommand() $db->createCommand()
->insert($sourceMessageTable, ['category' => $category, 'message' => $m])->execute(); ->insert($sourceMessageTable, ['category' => $category, 'message' => $m])->execute();
$last_id = $db->getLastInsertID(); $lastId = $db->getLastInsertID();
foreach ($languages as $language) { foreach ($languages as $language) {
$db->createCommand() $db->createCommand()
->insert($messageTable, ['id' => $last_id, 'language' => $language])->execute(); ->insert($messageTable, ['id' => $lastId, 'language' => $language])->execute();
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment