Jump to content

[SOLVED] Getting data from 2 identically fielded tables.


woolyg

Recommended Posts

Hi all,

 

Ive got 2 tables, both of which have exactly the same field names, but different data in the tables. I want to get name 3 fields in my mySQL query, and get data to display from both tables:

 

Table 1:

 

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

| House_Name |   House_Desc | Date_Added |

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

| MyHouse | Lovely              | 27-08-2006 |

| YourHouse | NotLovely | 17-06-2007 |

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

 

 

Table 2:

 

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

| House_Name |   House_Desc | Date_Added |

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

| OldHouse | Horrid              | 07-08-2006 |

| NewHouse | Warm | 02-06-2007 |

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

 

 

 

I would like to set up a query with the result showing 3 fields, sorted by date:

 

RESULT:

 

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

| House_Name |   House_Desc | Date_Added |

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

| NewHouse | Warm | 02-06-2007 |

| YourHouse | NotLovely | 17-06-2007 |

| OldHouse | Horrid              | 07-08-2006 |

| MyHouse | Lovely              | 27-08-2006 |

 

 

Can anyone help?

The result set I'm getting is basically the two tables side by side, depending on which join type I use. I'd like to combine the results into 3 neat fields...

 

Cheers,

Woolyg

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.