简体   繁体   English

CodeIgniter 和 MSSQL

[英]CodeIgniter and MSSQL

I've started to construct my own db class;我已经开始构建我自己的 db 类; where should I put this new db.php file?我应该把这个新的 db.php 文件放在哪里? Do I include('wherever/db.php') in the model from where I plan to run queries?我是否在计划运行查询的模型中include('wherever/db.php')

So something VERY obvious I just found was to use the sqlsrv not mssql db drivers as I was before resorting to writing my own db code.所以我刚刚发现的明显的事情是使用 sqlsrv 而不是 mssql db 驱动程序,因为我在诉诸编写自己的 db 代码之前。 I was able resolve my main issue without having to write custom code for my database connection.我能够解决我的主要问题,而无需为我的数据库连接编写自定义代码。

But thanks to the comments above by @Wolf and @DFriend, I learned so much more.但是感谢@Wolf 和@DFriend 的上述评论,我学到了更多。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM