[ic] Help with query/change/condition problem.

Tim Nelson interchange-users@icdevgroup.org
Mon Oct 14 08:32:00 2002


I have a query that I am trying to get working to display the area and cat
tables in a join.  When the area changes I want to put out a new heading
for that area.  The [prefix-change] tag seems to be working EXCEPT on the
first area ! !  So where I would expect to see:
  
Lumber  
   0:Doug Fir
   0:Pine
   0:Hardwood
   0:Treated
Millwork  
   1:Doors
   1:Windows
Hardware  
  13:Hinges
  13:Locksets
  13:Miscellaneous

...I am getting....
  
Lumber  
   0:Doug Fir
Lumber  
   0:Pine
Lumber  
   0:Hardwood
Lumber  
   0:Treated
Millwork  
   1:Doors
   1:Windows
Hardware  
   13:Hinges
   13:Locksets
   13:Miscellaneous

Here is the page, and ideas ?
Thanks, Tim.

---------------- page here ----------------
[query prefix=box more=1 ml=50 list=1
sql="select area.code,area.name,area.sort,cat.code,cat.name,cat.sort
from area,cat where area.code = cat.sel [scratchd myarea]
order by area.sort,area.code,cat.sort,cat.name"]

[list]
[box-change 0]
[condition][box-pos 0][/condition]
   <tr>
      <td colspan=2 width="200" bgcolor="__CATCOLOR__" valign="top">
         <font face="Verdana, Arial, Helvetica, sans-serif"
               size="1" color="#FFFFFF">
            <B>[box-pos 1]</B></font>
      </td>
   </tr>
[/box-change 0]

--------------------------------------------