object yii\db\ActiveQuery [
"sql" => "SELECT * FROM clients WHERE id_cart = 9455958663",
"on" => null,
"joinWith" => null,
"select" => null,
"selectOption" => null,
"distinct" => null,
"from" => null,
"groupBy" => null,
"join" => null,
"having" => null,
"union" => null,
"params" => [],
"queryCacheDuration" => null,
"queryCacheDependency"=> null,
"yii\base\Component_events" => [],
"yii\base\Component_eventWildcards" => [],
"yii\base\Component_behaviors" => [],
"where" => null,
"limit" => null,
"offset" => null,
"orderBy" => null,
"indexBy" => null,
"emulateExecution" => false,
"modelClass" => "frontend\models\Clients",
"with" => null,
"asArray" => null,
"multiple" => null,
...
]
1. Let V be undefined.
2. Perform ? CreatePerIterationEnvironment(perIterationBindings).
3. Repeat,
a. If test is not [empty], then
i. Let testRef be the result of evaluating test.
ii. Let testValue be ? GetValue(testRef).
iii. If ToBoolean(testValue) is false, return NormalCompletion(V).
b. Let result be the result of evaluating stmt.
c. If LoopContinues(result, labelSet) is false, return Completion(UpdateEmpty(result, V)).
d. If result.[[Value]] is not empty, set V to result.[[Value]].
e. Perform ? CreatePerIterationEnvironment(perIterationBindings).
f. If increment is not [empty], then
i. Let incRef be the result of evaluating increment.
ii. Perform ? GetValue(incRef).
А если мне необходимо к примеру, что бы один клиент имел связь с двумя типами, с двумя записями в таблице №1?Это уже связь многие-ко-многим. Организуется промежуточной таблицей, каждая запись которой связывает пару из первой и второй основных таблиц.
ORDER BY `id` = :id DESC, `date`
1,"Продукты и сырье"
1.1,"IT продукты"
1.2,"Автозапчасти и аксессуары"
1.2.1,"Аксессуары"
1.2.2,...
1.3,...
2,...
tmpfile
...
The file is automatically removed when closed (for example, by calling fclose(), or when there are no remaining references to the file handle returned by tmpfile()), or when the script ends.