I am dealing with some really old code that I am trying to run on Laravel. The database is complex and filled with unnecessary long-stored procedures for which I do not have a budget for rewriting.
For the most part, they work well, as I can access unique results, for example $ myID = $ result [0] โ id
I hope this is more than a knowledge gap in PHP ...
$result = DB::select(DB::raw("Call MyOldStoredProcedure()"));
print_r($result);
This gives me:
Array ( [0] => stdClass Object ( [MIN(user_responses.sectionid)] => 2 ) )
Sorry, I cannot access
$number = $result[0]["MIN(user_responses.sectionid)"]; //or...
$number = $result[0]->...
What can I do to get this unique result from this weird associative array / object? I am going to refuse and parse an array string, but I know the best way.