CodeIgniter切换驱动程序从mysql - > mysqli [英] CodeIgniter switching driver from mysql --> mysqli

查看:156
本文介绍了CodeIgniter切换驱动程序从mysql - > mysqli的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在读这个问题:
mysql扩展已弃用,将来会被删除:改用mysqli或PDO

它让我认为我应该从mysql更改为mysqli。它是一个字符的改变codeingiter,所以它不是很难:)

And it got me thinking that I should make the change from mysql to mysqli. It is a one character change in codeingiter so it isn't very hard :)

但是有什么我应该注意发现可能发生的任何错误?

But is there anything I should look out for to spot any errors that can happen? Are there certain queries that are treated differently?

推荐答案


某些查询有不同的处理方式吗?

Are there certain queries that are treated differently?

否。

MySQL和MySQLi扩充功能照顾PHP和MySQL数据库服务器之间的通信;

The MySQL and MySQLi extension are "drivers" that take care of the communication between PHP and the MySQL database server;

他们不改变SQL的范围

they do not change the range of SQL commands that the MySQL server understands.

只要DB抽象层负责使用什么PHP函数来实现什么目的(和一个框架如CI应该最肯定这样做),对于实际的查询没有什么可担心的。

So as long as the DB abstraction layer takes care of what PHP functions are to use for what purpose for you (and a framework like CI should most certainly do that), there is nothing to worry about in regard to the actual queries.

这篇关于CodeIgniter切换驱动程序从mysql - > mysqli的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆