Welcome Guest, Not a member yet? Register   Sign In
Sending results from a query to another query in the controller (newbie question)
#3

[eluser]fesweb[/eluser]
I don't think your code is going to do what you seem to want it to do, but maybe it's just a simplified version of what your trying to do.
Code:
// Is it as simple as needing to declare that var first?
<?php $placeholder = ''; ?>
<?php foreach ($query1->result() as $placeholder_row): ?>
<h1>&lt;?echo $placeholder_row->name?&gt;</h1>
// is your goal here to compare this placeholder with the one from the previous loop?
&lt;? $placeholder = $placeholder_row->placeholder; ?&gt;
&lt;?php foreach ($query2->result() as $section_content_row): ?&gt;
<p>&lt;?echo $section_content_row->name?&gt;</p>
&lt;?php endforeach; ?&gt;
&lt;?php endforeach; ?&gt;


Messages In This Thread
Sending results from a query to another query in the controller (newbie question) - by El Forum - 03-23-2010, 06:35 PM



Theme © iAndrew 2016 - Forum software by © MyBB