AZMel wrote:
>> results = select(
>> [
>> SubDivision.c.Subdivision_id,
>> SubDivision.c.Name,
>> SubDivision.c.DisplayOrder,
>> Division.c.Division_id,
>> Division.c.Name
>> ],
>> SubDivision.c.Division_id==Division.c.Division_id
>> ).execute()
>
> Yup Jonathan, that does work. Is there a way to pull the rows so that
> it is directly passable to the templates or would I have to build a
> function that would do that?
I am not sure I understand your question. You can do this select in
your
controller, or in another module, and just pass the "results" into your
template. Once they are in your template, you can loop through them and
display the results however you like:
<table>
<tr py:for="result in results">
<td>${result[1]}</td> <!-- subdivision name -->
<td>${result[4]}</td> <!-- division name -->
</tr>
</table>
I hope this helps.
--
Jonathan LaCour
http://cleverdevil.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---