The query is:
SELECT * FROM `noticias` WHERE `fecha` in ( select `fecha` from `noticias` group by `fecha` having count(*) > 1)
I´m trying in this form:
DB::table('noticias')->groupBy('fecha')->having('fecha', '>', 1)->get();
But this give me the error: SQLSTATE[42000]: Syntax error or access violation: 1055 'conversiones.noticias.id' isn't in GROUP BY (SQL: select * from noticias
group by fecha
having fecha
> 1)
Thanks!
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2GzBras
via IFTTT
Aucun commentaire:
Enregistrer un commentaire