Welcome Guest, Not a member yet? Register   Sign In
use db->query inside helper, possible?
#1

[eluser]jof[/eluser]
Hi

How do I use the db->query inside a helper?

Is that possible at all?

many thanks for help // johannes
#2

[eluser]jedd[/eluser]
[quote author="jof" date="1253298079"]Hi

How do I use the db->query inside a helper?
[/quote]

Anything is possible .. I think.

You almost definitely shouldn't be doing this, though, and it probably reflects a flaw in the design of your application. Try to relocate database queries into your model(s).

If you want to push ahead, read up on the [url="http://ellislab.com/codeigniter/user-guide/general/creating_libraries.html"]get_instance() function[/url].




Theme © iAndrew 2016 - Forum software by © MyBB