Skip to content

Tag: mysql

empty data in Laravel query

my response always empty ! if I run only one (where) separated in the Query I get data but if I run all three ( where ) Its empty ! my output Answer Change your controller code to something like this And if there’s an OR condition between branch and type then change your code like this

show difference between of two price list

I have history list of product price(order by created_at) like this: Now for show data in table I listed price using foreach method like this: I can see true output in table but I need to show difference between of two price in the third column like this picture: how do can i show difference between of two pr…

Get last record of each ID

I have this query : which returns ALL records from the ID’s I was thinking of using CURDATE as in order to get last records but when a record is not modified a day (they usually do but sometimes this is not the case) I’m loosing the records . How would I modify the query to get the last entry