How do I write my controller code below so that if $find is not present in Other OE Referances (the Data in the table is a string), then exclude?
I get that I potentially need to run Other OE Referances through a loop to separate them, and then check, but I also have a feeling I am overthinking.
Controller Snippet:
$find = 'G060162A2';
$letsFind = DB::table('parts')
->where('OE Number', '=', $find)
->orWhere('Other OE Referances', '=', $find)
->get();
Database:
object(stdClass)#584 (4) {
["ID"]=>
int(23)
["internal ID"]=>
string(6) "160980"
["OE Number"]=>
string(9) "G060162A2"
["Other OE Referances"]=>
string(37) "83222152426 ,83222289720, 83222305397"
}