MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Sean Hogston Date:April 3 2004 3:42am
Subject:Re: Is this possible?
View as plain text  
On Wed, 2004-03-31 at 16:08, Chris Boget wrote:
> I have 2 tables (looks best in fixed width font):
> 
> test_items
> +-------+----------+
> | name  | rec_num  |
> +-------+----------+
> | Book  | 1        |
> | Game  | 2        |
> +-------+----------+
> 
> test_attributes
> +---------------+------------+
> | item_rec_num  | attribute  |
> +---------------+------------+
> | 1             | Thick      |
> | 1             | Tall       |
> | 1             | Green      |
> | 2             | Narrow     |
> | 2             | Yellow     |
> +---------------+------------+
> 
> How can I query the above tables so that if I select name and
> attribute, the result set comes out looking like this:
> 
> +-------+-------------------+
> | name  | attribute         |
> +-------+-------------------+
> | Book  | Thick/Tall/Green  |
> | Game  | Narrow/Yellow     |
> +-------+-------------------+
> 
> Because every join query I've been able to think of always
> returns the result set as follows:
> 
> +------+-----------+
> | name | attribute |
> +------+-----------+
> | Book | Thick     |
> | Book | Tall      |
> | Book | Green     |
> | Game | Narrow    |
> | Game | Yellow    |
> +------+-----------+
> 
> So my question, is it even possible to do what I'd like to do?
> 
> thnx,
> Chris

Take a look at qiktable here www.qiktable.com If you are putting that
data into a html table qiktable can generate the table on the fly from
the data coming back from your query. It is highly configurable, and I
believe it will do what you are trying to accomplish.

Sean


Thread
Is this possible?Chris Boget31 Mar
  • RE: Is this possible?m.pheasant1 Apr
    • Re: Is this possible?Matt W1 Apr
      • Tricky date formatting issueScott Haneda1 Apr
        • SQLyog with Notification ServicesKaram Chand1 Apr
        • Re: Tricky date formatting issueJigal van Hemert1 Apr
    • Re: Is this possible?Chris Boget1 Apr
  • Re: Is this possible?Sean Hogston4 Apr