Welcome Guest, Not a member yet? Register   Sign In
how to run query within helper
#4

[eluser]xwero[/eluser]
Normally a helper with a query is a part of a custom library and if the library is build following the rules you would already have a model and 90% of the time there would already be a method that provides the data you need for your helper.

But if you don't want a model you still have to get the CI object an chain everything of that
Code:
$ci =& get_instance();
$ci->load->database();
$ci->db->query(’some query’);


Messages In This Thread
how to run query within helper - by El Forum - 01-17-2008, 01:15 AM
how to run query within helper - by El Forum - 01-17-2008, 01:18 AM
how to run query within helper - by El Forum - 01-17-2008, 01:21 AM
how to run query within helper - by El Forum - 01-17-2008, 01:31 AM
how to run query within helper - by El Forum - 01-17-2008, 01:39 AM
how to run query within helper - by El Forum - 01-17-2008, 01:53 AM
how to run query within helper - by El Forum - 01-17-2008, 03:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB