Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Nested loops
Hi,

I have a requirement. This is a brief description: university courses with
some of their readings. I want them to look like:

 ========================================
====================================
===========
Ref      COURSE                         Start             End
 ========================================
====================================
===========
001      Nursing 101                    21/12/2004        20/06/2005
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
= = = = = =
ID   Description
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
= = = = = =
01   Article 1 from Nursing times (full biblio goes here)
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
= = = = = =
02   Article 2 from Nursing times (full biblio goes here)
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
= = = = = =
03   Article 3 from Nursing times (full biblio goes here)
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
= = = = = =
04   Article 4 from Nursing times (full biblio goes here)
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
= = = = = =

 ========================================
====================================
===========
Ref      COURSE                         Start             End
 ========================================
====================================
===========
002      Midwifery 101                    21/12/2004        20/06/2005
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
= = = = = =
ID   Description
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
= = = = = =
11   Article 1 from Midwifery times (full biblio goes here)
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
= = = = = =
12   Article 2 from Midwifery times (full biblio goes here)
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
= = = = = =

And so on.

My code looks like this: (real code, unlike mickey-mouse example above)
 ========================================
====================================
===========
{section name=nr1 loop=$results}
<table border=0 cellspace=3 width=100%>
<tr bgcolor='#336699'>
<td align='center'><font size='2' color='#FFFFFF'><b>Module</b></font></td>
<td align='center'><font size='2'
color='#FFFFFF'><b>Lecturer</b></font></td>
<td align='center'><font size='2' color='#FFFFFF'><b>Start</b></font></td>
<td align='center'><font size='2' color='#FFFFFF'><b>End</b></font></td>
<td align='center'><font size='2'
color='#FFFFFF'><b>Students</b></font></td>
</tr>
<tr bgcolor='#99CCFF'>
<td align='center'><font size='1'>{$results[nr1].Module}</font></td>
<td align='center'><font size='1'>{$results[nr1].Lecturer}</font></td>
<td align='center'><font size='1'>{$results[nr1].Start}</font></td>
<td align='center'><font size='1'>{$results[nr1].End}</font></td>
<td align='center'><font size='1'>{$results[nr1].Students}</font></td>
</tr>
</table>
<table onclick="sortColumn(event)" border=0 cellspace=6 width=100%
cellpadding=6>
<thead>
<tr valign='bottom' bgcolor='#336699'>
<td><font size='1' color='#FFFFFF'><b>ID</b></font></td>
<td><font size='1' color='#FFFFFF'><b>Description</b></font></td>
</tr>
</thead>
{section name=nr2 loop=$results[nr1].results_t}
<tr valign='top' bgcolor='#99CCFF'>
<td align='left'><font size='1' color='#000000'><a
href='transaction.php?tr_id={$results[nr1].results_t[nr2].tr_id}&p_id={$resu
lts[nr1].p_id}'>ACTIVE<br>DETAIL</a></font></td>
<td><font size='1'
color='#000000'>{$results[nr1].results_t[nr2].Biblio}</font></td>
</tr>
</section}
</table>
{/section}
 ========================================
====================================
===========

However, I seem to get the same stuff repeating over and over, not what I
expected and no error messages.

Any ideas how I can get my design to work?

Cheers

George in Oxford

Report this thread to moderator Post Follow-up to this message
Old Post
George Pitcher
07-29-04 08:58 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Smarty Templates archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:28 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.