Welcome Guest, Not a member yet? Register   Sign In
sending query results to views
#1

[eluser]szulcseban[/eluser]
What are different ways of sending query results?
I'm a newbie and i'm using foreach and auxiliary view, but i cannot use it to sending on example single record
#2

[eluser]Crimp[/eluser]
If you mean a single variable, it's done like this:

Put the variable in your controller $data array to be loaded into the view:

Code:
$data['var'] = 'value';

You then access it in the view like this:

Code:
echo $var;

If you mean a single record from a query, look up the row() function in the user guide under generating query results.




Theme © iAndrew 2016 - Forum software by © MyBB