如何使用CodeIgniter运行mysqli查询? [英] How can you run a mysqli query with CodeIgniter?

查看:124
本文介绍了如何使用CodeIgniter运行mysqli查询?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人有一个线索如何运行一个mysqli查询与CI。我改变了配置文件中的数据库驱动程序,但我仍然无法使用多个查询像

Does anyone have a clue how to run a mysqli query with CI. I did change the db driver in the config file, but I'm still unable to use multiple queries like

$sql = "SELECT * FROM c WHERE 1;
        DROP TABLE IF EXISTS c;"
$query = $this->db->query($sql);

任何人都有任何线索如何使用只有CI,没有额外的库,因为理论上CI支持mysqli 。

Anyone has any clue how to do this using only CI, no additional libraries, because theoretically CI supports mysqli.

感谢

推荐答案

mysqli,我知道多个查询不支持。

At this moment, even if CI supports mysqli, multiple queries are not supported as far as I know.

这篇关于如何使用CodeIgniter运行mysqli查询?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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