php - Cakephp Find Problem -


I have a deal table, in the controller, with a field start date, I am trying to code down and this one There is a code here:

  function todays_deal ($ CitySlug = null) {$ city = $ this- & Gt; City-> $ 'City' = $ city ['city'] ['id']; $ now = ('first', array ('conditions' = & gt; array (' city slug '=' gt; $ CitySlug) Date ('Y-M-DH: I: S'); $ Circuit = Array ('Deal.city_id' => $ CityID, 'Type Deal' => 'F', 'Deal. & Gt; = '= & gt; $ now); $ Deal = $ this-> Deals-> Search (' first ', array (' conditions' = & gt; $ terms, 'order' = & Gt; 'Deal. Start DESC'); $ Left = array (); $ Now = Time (); // Timestamp $ end = strtotime ($ deal ['deal'] ['end'] Change date; ) $ Start = strtotime ($ deal ['deal'] ['start']); if ($ A $ End = $ start;} $ Diff_time = $ left_time = $ end - $ now; if ($ start = gt = $ now) {$ diff_time = $ left_time = $ start - $ now $} Left_day = Floor ($ diff_time / 86400); $ Left_time = $ left_time% 86400; $ Left_hour = Floor ($ left_time / 3600); $ Left_time = $ left_time% 3600; $ Left_minute = Floor ($ left_time / 60) ; $ Left_time = $ left_time% 60; $ this-> set (compact ('deal', 'left_day', 'left_hour', 'left_monit', 'left_time', 'now', 'diff_time'));  

All help is appreciated

thanks DAV

I am totally lost because it is the form of any deal It should not back in.

If you get up, then it should dump the questions used.

SQL generated for your selection - Probably a date format problem.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

javascript - What is an alternative to using getElementByClass for hiding multiple elements? -

c# - GetType() == type perfomance question -