大家好:
想請問sql like 語法
classtime 有以下幾筆:
識別碼:5 classtime:D
識別碼:6 classtime:89C
識別碼:9 classtime:CDE
$osecarray=array(C,D,E)
foreach ($osecarray as $singlesec)
{
$nloanlist=loanlist::select('識別碼')->where('識別碼','!=',decrypt($deid))->where('classroom',$oclassroom)->where('starttime',$ostarttime)->where('classtime','like','%'.$singlesec.'%');
$result=$nloanlist->pluck('識別碼');
echo $result;
}
輸出[6,9][5,9][9] 想將內容寫入陣列 但是還要識別碼有無在陣列重複
請問要怎麼變成[6]、[5]、[9]
謝謝!