How to change mysql to mysqli?

前端 未结 11 1903
余生分开走
余生分开走 2020-11-21 04:55

Based on this code below I use for regular mysql, how could I convert it to use mysqli?

Is it as simple as changing mysql_query($sql); to

11条回答
  •  天涯浪人
    2020-11-21 05:34

    I would tentatively recommend using PDO for your SQL access.

    Then it is only a case of changing the driver and ensuring the SQL works on the new backend. In theory. Data migration is a different issue.

    Abstract database access is great.

提交回复
热议问题