4 ms·
What's more concerning is the amount of people choosing not to use parameterized queries with mysqli: https://github.com/search?q=extension%3Aphp+mysqli_query+%
by martin_ 13y ago
What's more concerning is the amount of people choosing not to use parameterized queries with mysqli: https://github.com/search?q=extension%3Aphp+mysqli_query+%24_GET&type=Code&ref=searchresults https://github.com/search?q=extension%3Aphp+mysqli_query+%24...
- McGlockenshire 13y agoHave you tried using mysqli's implementation of parameterized queries in real, live code? I mean, sure, it works, but it's ugly and inconvenient. PDO does it much, much better.
- ygra 13y agoThis could be in part because the procedural interface of mysqli is deliberately designed to be vyer similar (if not identical) to the mysql one. So maybe they just continued writing their code that way but replaced mysql by mysqli because someone told them mysqli was better and supported (which it is, but probably for other reasons). I wonder whether a similar search for the mysqli OO interface yields the same amount of unsanitised queries. (Assumption: People using the OO interface looked through the documentation more closely and maybe understand the ways in how mysqli is better than mysql. But that's just an unfounded assumption.)