Welcome Guest, Not a member yet? Register   Sign In
Passing Query Results into Views Effeciently
#2

[eluser]Dam1an[/eluser]
The easiest way would be to get the single row in the controller
Code:
// assuming getBusiness returns the query
$data['business'] = $this->Businesses->getBusiness($bus_number)->row();

And then call the object in the view, such as
Code:
<input type="text" name="bus_name" size="36" value="<?=$business->name; ?>" class="required" />
<input type="text" name="bus_name" size="36" value="<?=$business->number; ?>" class="required" />
...


Messages In This Thread
Passing Query Results into Views Effeciently - by El Forum - 04-26-2009, 02:33 AM
Passing Query Results into Views Effeciently - by El Forum - 04-26-2009, 04:55 AM
Passing Query Results into Views Effeciently - by El Forum - 04-26-2009, 05:08 AM
Passing Query Results into Views Effeciently - by El Forum - 04-26-2009, 10:07 AM



Theme © iAndrew 2016 - Forum software by © MyBB