3 ms·
> Which is currently among the top three, could be prefaced by the built in mysqli escape function or at minimum cast to (int). OTOH it is entirely unnecessary
by masklinn 10y ago
> Which is currently among the top three, could be prefaced by the built in mysqli escape function or at minimum cast to (int).
OTOH it is entirely unnecessary to quote integers (and the escaping function would not quote it before injecting it), so outlook not so good.
- nkozyra 10y agoYes, it's unnecessary, but it doesn't cause a problem for MySQL. I've seen lots of people do that though I don't know their rationale. Maybe they just don't know SQL
- masklinn 10y ago> Yes, it's unnecessary, but it doesn't cause a problem for MySQL. It's not necessary in any DB, SQL specifies coercion of any value when the expected data type is unambiguous (and in a bunch of other cases, SQL is pretty weakly typed all in all).
- nkozyra 10y agoBut again, it's not causing harm.