Ruby on Rails Friday, June 8, 2012

On Jun 8, 2012, at 8:04 AM, Erwin wrote:

> when contents.state is NULL, then the record IS NOT selected
> when contents.state is'' ( empty ) then the record is selected
> ( obviously when set to any other value too..)

Yes, it's how SQL works--NULL is 'unknown', so comparison with any value returns null. You need a SQL primer, and look especially for three-valued logic.

--
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice




--
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