Welcome Guest, Not a member yet? Register   Sign In
2 questions
#1

[eluser]Unknown[/eluser]
First: why is the codeigniter database WHERE method not mentioned in the user guide? I just spent 2 hours trying to figure out why my SQL statement isn't working (I had to watch the video tutorial), please add it in!

Second: I have a function inside another controller, how can I access this from another controller (like, I want the function to be available from the index controller)

Basically, I have a function inside a controller, and in the home_view page, I want to check what value the function returned, and generate data based off of that.
How can I use the function?

Thanks guys!
#2

[eluser]jedd[/eluser]
[quote author="Invsioncode" date="1261359567"]First: why is the codeigniter database WHERE method not mentioned in the user guide?[/quote]

Do you mean [url="/user_guide/database/active_record.html"]this user guide[/url] - about a fifth the way down?

Quote:Second: I have a function inside another controller, how can I access this from another controller (like, I want the function to be available from the index controller)

Did the [url="/wiki/FAQ"]FAQ[/url] not provide sufficient insight into this question?

PS. s/off of/from/g
#3

[eluser]richthegeek[/eluser]
I always thought the documentation was well laid out - I've certainly never had a problem finding what I need at least. I do know that the video tutorial specifically mentions that it uses the AR part of the DB library...

With regards to using controllers methods inside other controllers, you need to migrate the core of these functions to a library or model depending on context.

And jedd: not every understands sed syntax!




Theme © iAndrew 2016 - Forum software by © MyBB