jeudi 21 juin 2018

Trying to get property of non-object on query data

I have a table with column code ,program_string_id,practice_string_id

$project=db::table('project as p')->where('p.code',$asset_request->project_code);
$project_type=$project->select('p.practice_string_id','p.program_string_id')
->first();

print_r($project_type) gives stdClass Object ( [practice_string_id] => PRACTICE0019 [program_string_id] => )

print_r($project_type->practice_string_id); returns Trying to get property of non-object.how to get the value in laravel query



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2MIJB0t
via IFTTT

Aucun commentaire:

Enregistrer un commentaire