News for hackers. Stuff that matters.
Re:SQL Tips and Tricks by ricardo81 on Wednesday September 25, 2024 @02:23AM (#41644248)
Presumably you are thinking about queries in code that add WHERE clauses dynamically that aren't escaped correctly- which doesn't have to be the case.

1 = 1 is at least handy for simply joining a variadic amount of other clauses with ' AND ' rather than counting if there's any to add at all.

Re:SQL Tips and Tricks by AtNightWeCode on Wednesday September 25, 2024 @09:15AM (#41647154)
Yes. "Use a dummy value in the WHERE clause so you can dynamically add and remove conditions with ease:" I don't know how to read this in another way.
Re:SQL Tips and Tricks by regexman1 on Thursday September 26, 2024 @07:26PM (#41664669)
I've amended the README.md to explain what I meant. My error was in using the word dynamic!