473,395 Members | 1,689 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

nested tables?

Say I have a table of products that I sell. There are four columns -
part_number, item_name, item_picture, item_price. The problem is that
I want to group some items in this table together.

For example, say one of the items I sold was a hose by a particular
company and that this hose came in several lengths. In the SQL
database's table, each hose might be in a separate row, however, in
the html table, I'd like them to be associated with one another. ie.
there could be a table in the item_price column, for this particular
row - a table that associates each length with a price.

Unfortunately, this doesn't seem to be very syntactically correct and
I'm not really sure what I can do (I don't really like the idea of
nesting tables, but I also want something that I can turn into the
layout I want with just a little bit of css).

Any ideas?

Mar 31 '07 #1
3 2174
On Mar 31, 10:10 am, "yawnmoth" <terra1...@yahoo.comwrote:
Say I have a table of products that I sell. There are four columns -
part_number, item_name, item_picture, item_price. The problem is that
I want to group some items in this table together.

For example, say one of the items I sold was a hose by a particular
company and that this hose came in several lengths. In the SQL
database's table, each hose might be in a separate row, however, in
the html table, I'd like them to be associated with one another. ie.
there could be a table in the item_price column, for this particular
row - a table that associates each length with a price.

Unfortunately, this doesn't seem to be very syntactically correct and
I'm not really sure what I can do (I don't really like the idea of
nesting tables, but I also want something that I can turn into the
layout I want with just a little bit of css).

Any ideas?
Two other ideas that occurred to me.

I could create new tables for things I'd like to group together. The
problem with this is that not all items can be grouped together. I
could have tables with a single row (which seems kinda counter
productive) or I could group all the items that aren't otherwise
groupable together. The problem with the latter is that... what if,
in the stylized presentation, I want to have an "item" with multiple
prices between two items with single prices?

Another idea I had was that I could assign each tr to a specific css
class, depending on how it ought to be grouped. The problem with this
is that I'm not sure how I'd go about presenting the items in any
order other then the one the table is in...

Mar 31 '07 #2
yawnmoth wrote:
Say I have a table of products that I sell. There are four columns -
part_number, item_name, item_picture, item_price. The problem is that
I want to group some items in this table together.
It sounds like you want to make a list within a table row.

<td>
<ul>
<li>list item price: </li>
<li>list item price: </li>
<li>list item price: </li>
<li>list item price: </li>
</ul>
</td>

There's nothing with using a table within a table and it's the easiest
to format...I'd use a table.
Mar 31 '07 #3
On Sat, 31 Mar 2007, yawnmoth wrote:
Say I have a table of products that I sell. There are four columns -
part_number, item_name, item_picture, item_price. The problem is that
I want to group some items in this table together.

For example, say one of the items I sold was a hose by a particular
company and that this hose came in several lengths. In the SQL
database's table, each hose might be in a separate row, however, in
the html table, I'd like them to be associated with one another. ie.
there could be a table in the item_price column, for this particular
row - a table that associates each length with a price.

Unfortunately, this doesn't seem to be very syntactically correct and
I'm not really sure what I can do (I don't really like the idea of
nesting tables, but I also want something that I can turn into the
layout I want with just a little bit of css).

Any ideas?
The most syntactically correct way to do this, I believe, is with multiple
TBody elements. This will give you only one level of nesting, however, but
it sounds like that might be enough for you.

-Christopher
Mar 31 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Dustin | last post by:
Here's what I am trying to do: (Names represent CSS classes.) I want to create a photo gallery. I want the entire gallery to be surrounded by a box named PhotoGallery. I want a fluid placement...
1
by: Hazz | last post by:
I have 5 tables in SQL Server. Each with the following design and a sample chain of the relationships from the root (WRL - World) UUS is the 'Code' of the first table and it is the 'Parent' value...
0
by: Ed Allan | last post by:
http://ejaconsulting.com/nestedrepeater/NestedRepeater.txt >-----Original Message----- >Doh! The HTML has all been rendered . . . > >Right click on this link and select 'Save target as ..' >to...
4
by: Steve Klett | last post by:
(I posted this in ADO group, but I think this group will be better) Hi- I need to develop an FAQ section for our website. We would like to break up the FAQ by products, then categories with...
0
by: George Durzi | last post by:
I have a DataSet with 3 tables, and two DataRelations dsSubs.Tables.TableName = "Subscriptions" dsSubs.Tables.TableName = "AccountManagers" dsSubs.Relations.Add "AccountManagers_Subscriptions",...
3
by: Eirik Eldorsen | last post by:
Im trying to make a nested repeater with 3 levels. I've successfully created a nested repeater with 2 levels, but when adding the 3rd level I get an InvalidCastException. What am I doing wrong? ...
1
by: Thu | last post by:
Hi, I create a Dataset to link three tables in my Access database. E.g. The three tables are , , . I then create 2 DataRelations, 1st relation (Order_Cust_Rel) links and using CustomerID field...
5
by: BMeyer | last post by:
I have been losing my mind trying to parse an XML document (with nested child elements, not all of which appear in each parent node) into a DataGrid object. What I want to do is "flatten" the XML...
0
petepell
by: petepell | last post by:
Hello all, I am developing an application in VB 2008 that works with a SQL2005 DB to store and manipulate employee data. In one section of the app I want to be able to show a treeview of the...
25
mshmyob
by: mshmyob | last post by:
I am in testing mode for this part of my app so I can change anything to make this work. I have added email functionality to one of my apps. I use SMTP to send and either POP3 or IMAP4 to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.