samedi 31 octobre 2015

Create subquery in Laravel - Query builder

I try to create a sub query. For now, my two queries are :

select `key` from messages group by `key`;

and

select * from messages where `key` = 'KEY_RECUP_AU_DESSUS' order by created_at DESC LIMIT 1;

The aim is to highlight my table messages all elements grouped by key and keeping the last element ( created_at desc)

Thank you



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1Wn2c4e
via IFTTT

Aucun commentaire:

Enregistrer un commentaire