Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can you elaborate on security issues here?


I think that it means the reason for doing where 1 = 1 is sometimes to allow for easy insertion of dynamic queries which can be a security and performance issue. The actual usage of where 1 = 1 doesn't cause the security or performance issue.


Which is exactly what the site says. To insert dynamic conditions. I know that you can use 1=1 for the same reasons as trailing commas. But kinda obvious that this is not the case here.


Just to be clear I'm using it for the same reason as trailing commas.

If I'm inspecting a dataset I use WHERE 1=1 so I can add and remove conditions more easily.

I realise the confusion is in my wording of dynamic - I might amend the README.md to clarify. Thanks for the feedback!




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

Search: