Categories > TinyButStrong general >

headergrp doesnt work with DB query

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: bunak
Date: 2004-04-01
Time: 20:32

headergrp doesnt work with DB query

I tested create menu using headergrp
when I fill array all works correctly, but when I use DB query headergrp dont repeat.

I have this SQL
select vyrobceproduktu.Vyrobce, typproduktu.Typ, produkt.NazevProduktu  from produkt left join vyrobceproduktu on produkt.IdVyrobce = vyrobceproduktu.IdVyrobce left join typproduktu on produkt.IdTypu = typproduktu.IdTypu order by vyrobceproduktu.Vyrobce, typproduktu.Typ, produkt.NazevProduktu

I have this template
<table width="100%" border="0" cellspacing="1" cellpadding="0">
        <tr>
          <td bgcolor="#CACACA"><strong>[blk_res.Vyrobce;block=tr;headergrp=Vyrobce]</strong></td>
        </tr>
        <tr>
          <td  bgcolor="#E6E6E6"><u>[blk_res.Typ;block=tr;headergrp=Typ]</u></td>
        </tr>
        <tr>
          <td bgcolor="#F0F0F0">[blk_res.NazevProduktu;block=tr]</td>
        </tr>
</table>

but solution looks like this
Telecom
Analogovy modem
Telecom123
Telecom456
Omni 56K
Omni 56K Plus
Elite 2864I
Omni Net Plus

and I am waiting for this
Telecom
Analogovy modem
Telecom123
Telecom456
Zyxel
Analogovy modem
Omni 56K
Omni 56K Plus
ISDN modem
Elite 2864I
Omni Net Plus

please help me how can I solve it?
Regards
Bunak
By: RwD
Date: 2004-04-01
Time: 21:26

Re: headergrp doesnt work with DB query

usually I myself screw up in the query.

Run the query in a program like PHPMyAdmin and see how many rows the query actually returns first...
By: bunak
Date: 2004-04-01
Time: 22:35

Re: headergrp doesnt work with DB query

Solution of query is:
Vyrobce,Typ,NazevProduktu

Telecom,Analogový modem,Telecom123
Telecom,Analogový modem,Telecom456
Zyxel,Analogový modem,Omni 56K
Zyxel,Analogový modem,Omni 56K Plus
Zyxel,ISDN modem,Elite 2864I
Zyxel,ISDN modem,Omni Net Plus
By: bunak
Date: 2004-04-02
Time: 08:42

Re: headergrp doesnt work with DB query

WOW!!! I find it!!! It sounds little bit stupid, but column names for using with headergrp MUST BE SMALL CHARACTERS!!!! It means vyrobce instead Vyrobce ... :o(
By: RwD
Date: 2004-04-02
Time: 10:56

Re: headergrp doesnt work with DB query

thanks!

I was going to implement it this weekend into a site I built and maintain, I use uppercase letters in names very often

------
Skrol29
Will this be changed for tbs v2??