Answer the question
In order to leave comments, you need to log in
Laravel database query?
I am rewriting a raw query from an old project that we transfer to laravel and I am trying to implement the old query through the query builder. The queries look the same, I looked through the QueryLog , but the result is completely different. BD is also different. at the time of the request, I did a dump from the old database to the new one. And I don't understand what could be wrong?
here is the old query raw
"SELECT COUNT(*), `name` FROM `table`
WHERE (`TimeP1` > ? OR `TimeP2` > ? OR `TimeP3` > ? OR `TimeP4` > ?)
AND ((`Status`!= ? AND `Status`!= ?) OR (`Case_new` = ?))
AND `del`= ? GROUP BY `name` ORDER BY `name` ASC"
select count(*) as count, `name` from `table`
where (`TimeP1` > ? or `TimeP2` > ? or `TimeP3` > ? or `TimeP4` > ?)
and ((`Status` != ? and `Status` != ?) or (`Case_new` = ?))
and `del` = ? group by `name` order by `name` asc
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question