Support the ongoing development of →
posted 3 years ago
Last updated 1 year ago.
moderator Solution

From the documentation:

The select method will always return an array of results. Each result within the array will be a PHP stdClass object, allowing you to access the values of the results:

You need something like this to get the result.

DB::select('call generateCugPlanReport(:prefixName, @cugPlanReportID)', [ "prefixName" => $data["prefixName"] ]);

$cugPlanReportID = null;
$selectResult = $DB::select('SELECT @planReportID AS planReportID');

if (!empty($selectResult) && isset($selectResult[0]->planReportID)) {
    // we have a result
    $cugPlanReportID = $selectResult[0]->planReportID;
Last updated 3 years ago.

sheenilim08 liked this reply


Thanks Tobias!!

tvbeek liked this reply


Sign in to participate in this thread!


Your banner here too?


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.