本文整理匯總了PHP中app\models\Item::whereIdItem方法的典型用法代碼示例。如果您正苦於以下問題:PHP Item::whereIdItem方法的具體用法?PHP Item::whereIdItem怎麽用?PHP Item::whereIdItem使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類app\models\Item
的用法示例。
在下文中一共展示了Item::whereIdItem方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: calculeNoteExamen
function calculeNoteExamen($id_Examen)
{
$note_Examens = Note_Examen::whereIdExamen($id_Examen)->get();
foreach ($note_Examens as $note_Examen) {
$note_Examen_Note = 0;
$note_Stations = Note_Station::whereIdNoteExamen($note_Examen->id_Note_Examen)->get();
foreach ($note_Stations as $note_Station) {
$note_Items = Note_Item::whereIdNoteStation($note_Station->id_Note_Station)->get();
$note_Station_Note = 0;
foreach ($note_Items as $note_Item) {
if ($note_Item->note == 1) {
$note_Station_Note += Item::whereIdItem($note_Item->id_Item)->first()->valeur;
}
}
$note_Station->note = $note_Station_Note;
$note_Station->save();
$note_Examen_Note += $note_Station_Note * Station::whereIdStation($note_Station->id_Station)->first()->ponderation / 100;
}
$note_Examen->note = $note_Examen_Note;
$note_Examen->save();
}
}