News for hackers. Stuff that matters.
Re:Ask HN: What is the most beautiful piece of code you've e... by alex-ant on Monday October 28, 2019 @05:02AM (#21375314)
Had a case where I needed to update MySQL column's value if an incoming argument is less/greater than it without using functions or procedures.

This returns the greatest value (passed ? or max_value column):

  ?^((?^max_value)&-(?<max_value))
And for minimum:

  min_value^((?^min_value)&-(?<min_value))

There are no comments on this comment yet.