Hacker Newsnew | past | comments | ask | show | jobs | submit | brianwu02's commentslogin

the last OR statement "OR 102" will evaluate true.

It should be

    UPDATE permissions SET allow = 1 WHERE user=671156 AND permission=16 AND org=101 OR org=102;


You and fazzone have posted different answers. I'm a little unclear on which matches the original intent, but your where clause is equivalent to:

  (user=671156 AND permission=16 AND org=101) OR (org=102)


That is still wrong and would apply to everyone in org 102


Applying to everyone in org 102 is the intended behavior no? The slip-up would be the 'OR 102' which would just evaluate to true.


The example query is supposed to match a single account, not an org.


An introduction to a community that just so happens to be centered around technology.

As far as my career goes, it has given me a wealth of perspective on the different tools people are using to solve their problems.


It really isn't as simple as adding a checkbox. Just think about the design implications...


Doubt any firm would even consider remote interns unless you want to "intern" doing data entry. Getting you caught up would take a tremendous amount of resources that is just not worth the effort.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: