Re:How not to structure database-backed web apps: performanc...
by weavie on Thursday June 28, 2018 @03:53AM
(#17414908)
What difference does using prepared statements make?
[ Parent
| on HN ]
Re:How not to structure database-backed web apps: performanc...
by skunkworker on Thursday June 28, 2018 @04:05AM
(#17414966)
You can avoid SQL injection. It makes it harder to shoot yourself in the foot, though still possible to inject if your prepared statement includes a string interpolated variable.
Re:How not to structure database-backed web apps: performanc...
by weavie on Thursday June 28, 2018 @04:11AM
(#17414987)
Yes, good point.
Re:How not to structure database-backed web apps: performanc...
by qaq on Thursday June 28, 2018 @05:26AM
(#17415332)
You have abstraction between your code and DB you can change underlying tables but interface will remain consistent requiring no changes to the application. There are security benefits too easier to prevent SQL Injection, you also only give the app user permission to execute sps so no arbitrary queries can be run.