lundi 13 juin 2016

Laravel 5.2 query using query builder

How i do this query using query builder:

SELECT code FROM client WHERE code
//                =(SELECT max(code) FROM client where code LIKE '" . $year . "%')";

i try this:

$row = Client::find(DB::table('client')->max('code'));

but return null



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire