When *not* to use prepared statements?

前端 未结 6 1960
孤街浪徒
孤街浪徒 2020-11-29 01:56

I\'m re-engineering a PHP-driven web site which uses a minimal database. The original version used \"pseudo-prepared-statements\" (PHP functions which did quoting and parame

6条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-29 02:26

    Prepared statements are being used by thousands of people and are therefore well-tested (and thus one can infer they are reasonably secure). Your custom solution is only used by you.

    The chance that your custom solution is insecure is pretty high. Use prepared statements. You have to maintain less code that way.

提交回复
热议问题