mardi 13 novembre 2018

How to get the value of specific index inside an array column using mysql?

This is my database table

$reports = DB::table('attendance_report_details') ->select('*','project_hours[$index_id]') ->get(); I am passing index id to the function. Is there a way to do it like this? I need to return the sum of all the projects in the specified index.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire