3 ms·
Php has nothing like this? In [1]: "... WHERE " + " AND ".join(str(i) for i in range(4)) Out[1]: '... WHERE 0 AND 1 AND 2 AND 3' Very strange.
by freilanzer 2y ago
Php has nothing like this?
In [1]: "... WHERE " + " AND ".join(str(i) for i in range(4))
Out[1]: '... WHERE 0 AND 1 AND 2 AND 3'
Very strange.
- egormakarov 2y agoThis will produce broken SQL on empty clauses list. Very strange.
- freilanzer 2y agoYou're quite right, but this is easily fixed. That doesn't change my question, since something like this is much easier that the other logic.
- paperplatter 2y agoThe easiest fix for this is the "WHERE 1=1" or "WHERE true"