Should I have to upgrade my website to PHP MySQLi or PDO?

后端 未结 3 839
天命终不由人
天命终不由人 2021-01-19 00:14

I have designed a website before 5 years using PHP MySQL and still works fine without any issues. I heard MySQL is officially deprecated as of PHP 5.5 and has been removed a

3条回答
  •  死守一世寂寞
    2021-01-19 00:39

    The answer is fairly simple.

    If, like majority of PHP users, you are going to use database API functions right in the application code, without any intermediate wrapper, then PDO is your only choice, as it's a sort of wrapper already, automating many operations that with mysqli have to be done manually.

    No, there are no migration options, because the very approach is changed dramatically: instead of placing variables right in the query, they have to be substituted in the query with special marks. There is no way to automate this process.

提交回复
热议问题