On Jan 29, 7:08 am, bingo bob <li...@ruby-forum.com> wrote:
> Logging now on in production for a while. so that helps.
>
> '2011-01-28 13:58:38' AND updated_at <= '2011-01-28 13:58:38' AND deal =
> true) ORDER BY updated_at DESC, updated_at ASC LIMIT 20
>
> But then I change the time to 11am "1100" it does this....!
>
> IP/apps.json?date_from=2011-01-28%1100:58:38&date_to=2011-01-28%1100:58:38
>
You haven't ch age the time to 11am. You've added %11 to the URL which
will translate to some unprintable control character so mysql can no
longer parse the date. It seems like you're last passing the date
strings you get straight through to mysql so I suggest you lookup on
mysql what date formats it is guaranteed to understand (or in your
controller, ensure that input is appropriately coerced)
Fred.
> Processing AppsController#index to json (for90.211.81.40at 2011-01-29
> 07:06:18) [GET]
> Parameters: {"date_to"=>"2011-01-28\02100:58:38",
> "date_from"=>"2011-01-28\02100:58:38"}
> App Load (610.0ms) SELECT * FROM `apps` WHERE (updated_at >=
> '2011-01-2800:58:38' AND updated_at <= '2011-01-2800:58:38' AND deal =
> true) ORDER BY updated_at DESC, updated_at ASC LIMIT 20
>
> Why? How? What next?
>
> --
> Posted viahttp://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment