I need to cross examine two database fields for a yes/no result.
Just wondering if the below makes sense with what I need to do.
((a + b) + c = d) if a + b are true and c is also true then return Yes
((a + b) + c = d) if a + b are false and c is false then return No
((a + b) + c = d) if a + b are true and c is false then return No
((a + b) + c = d) if a + b are false and c is false then return No
pseudo code aside,
I need to be able to turn this into PHP, if I remove b from the equation I return a result perfectly fine but adding additional checks just returns blank.
@if ($report->subjectid == '2' && $report->subjectid == '3' && $report->metprogress == '1') Yes
@elseif ($report->subjectid === '2' && $report->subjectid == '3' && $report->metprogress == '4' or
$report->subjectid === '2' && $report->subjectid == '3' && $report->metprogress == '5') No
@endif</td>
This is the current code I have which obviously doesn't correlate with the pseudo code as I'm trying to figure out the actual structure I need.
Thanks in advance.
Aucun commentaire:
Enregistrer un commentaire