开发者

Codeigniter - SQL query from view

I know its not meant to be done, but could someone show me how to run an SQL query f开发者_如何学运维rom a view.

Cheers


I assume you mean you want access to your models? You can get the main CodeIgniter object/controller with get_instance(), and then access the model through that:

$ci =& get_instance();

$ci->Model_name->find(...);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜