Welcome Guest, Not a member yet? Register   Sign In
foreach to start a new query
#1

[eluser]Unknown[/eluser]
i would like to start a db query with a value of a foreach. normaly i do this directly but with the mvc model i go insane...

can i send a a value from a view to a controller (not by uri or post)?
#2

[eluser]Unknown[/eluser]
Or maybe can i call a function from a controller with a value directly in my view?
#3

[eluser]Yash[/eluser]
what are you talking read [url="http://ellislab.com/codeigniter/user-guide/"]User Guide[/url]

Everthing is possible.
#4

[eluser]Colin Williams[/eluser]
Quote:i would like to start a db query with a value of a foreach

Sounds like you could potentially run a whole lot of queries unnecessarily, when you could just use a join and then loop through the result.

Quote:but with the mvc model i go insane

Unfortunately this is a known side effect Smile Your database stuff should go in a Model, but it doesn't HAVE to. The User Guide covers this extensively. Give it a peak.
#5

[eluser]khmer angkor[/eluser]
show the sample example
http://ellislab.com/forums/viewthread/86257/




Theme © iAndrew 2016 - Forum software by © MyBB