3 ms·
Or installs Doctrine DBAL which handles it all for you. At the cost of some performance, but the ease-of-use with a highly-tested and relied-upon library norma
by porker 5y ago
Or installs Doctrine DBAL which handles it all for you.
At the cost of some performance, but the ease-of-use with a highly-tested and relied-upon library normally outweighs that.
- Cthulhu_ 5y agoYup, make it work (securely!) before making it fast; you can't diagnose performance if your code isn't working as it should in the first place (and SQL injection safety is a non-functional requirement; you can't consider code working if there's that weakness). In practice, bad database design or access (like the n+1 problem) will weigh heavier than the overhead added by a library like Doctrine. Or, it should, if Doctrine adds THAT much overhead it's a problem.