[ic] arbitrary database display

Alex Lofaso (Planetanime.com) interchange-users@icdevgroup.org
Fri Nov 22 13:27:01 2002


Hello list!

I've been trying to display the data from a arbitrary database table in my
fly page.  For each sku from the products table there is a number of
records in my product_detail_parameters table.  For example for sku xyz
there could be 3 rows:
sku id  parameter  value
xyz 1   p1         v1
xyz 2   p2         v2

etc...

here is the code i am using to display these records:

     [if-item-data products_detail_parameters sku]

     <table width="100%" cellspacing="0" cellpadding="5">

     [query sql="SELECT parameter, value FROM product_detail_parameters
     where sku = [item-code] ORDER BY id"        type=list
        list=1
        ]
     [list]
        <tr>
                <td>
                <li><b>[sql-param parameter]: </b>
                [sql-param value]</li>

                </td>
        </tr>
     [/list]
     [/query]

     </table>
 [/if-item-data]


Despite the fact that there is data in the table, I cannot seem to get any
results to display.  I've also tried using the loop search method to no
avail.  Any help would be great!
Thanks

Alex