Lurker News
Preferably an elegant snippet rather than an entire (well engineered) codebase.

Comments (380) 116 threads

Show all comments

Showing thread 80 of 116

alex-ant#
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)&-(?
And for minimum:

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