How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask ATLPROG Your Own Question

ATLPROG
ATLPROG, Computer Software Engineer
Category: Programming
Satisfied Customers: 7677
Experience:  MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML
44910485
Type Your Programming Question Here...
ATLPROG is online now
A new question is answered every 9 seconds

I need to retrieve the min value ignoring 0 using laravel.

Customer Question

I need to retrieve the min value ignoring 0 using laravel. This is the code that I have:
static function etomin($month, $year)
{
return day::where(\DB::raw('month(fecha)'), $month)
->where(\DB::raw('year(fecha)'), $year)->get()
->min('evotranspiration');
}
Submitted: 1 year ago.
Category: Programming
Expert:  Robert Preston replied 1 year ago.

Hi there

Expert:  Robert Preston replied 1 year ago.

So help me understand what is happening here.

You have a day model. The day model contains a month and a year.

So you want to get all days for a given month and a year, then find the minimum value of the evotranspiration in that month.

Expert:  Robert Preston replied 1 year ago.

Do you have a staging/test server where I could look at the query and fix it for you?

Customer: replied 1 year ago.
I already sent the code of the query and since this take a while I found the answer in another place.
Best regards,
Andrés Araneda.
Expert:  Robert Preston replied 1 year ago.

Yes, I read the query over and asked specific questions about it, so of course you know I sent it... Okay, if you need any help in the future let us know.

Related Programming Questions