Page 1 of 1

MYSQL: Concat two tables

Posted: Sun May 09, 2010 12:49 pm
by lauthiamkok
Hi,
I have two tables, for instance,

Table 1
======

id_1 / title_1 / date_1
-------------------------
1 / A / xxx
2 / B / xxx


Table 2
======

id_2 / title_2 / date_2
-------------------------
1 / C / xxx
2 / D / xxx



How can make make the query so that I can have this result that it is i sorted by date,

id / title / date
-------------------------
1 / A / xxx
2 / C / xxx
1 / B / xxx
2 / D / xxx

Is it possible?

I tried to JOIN or to LEFT JOIN them, but it won't get the result I am looking for, is there any other SQL syntax I can try??

Many thanks,
Lau

Re: MYSQL: Concat two tables

Posted: Sun May 09, 2010 10:05 pm
by requinix
Why do you have two tables?

Re: MYSQL: Concat two tables

Posted: Mon May 10, 2010 1:27 pm
by AbraCadaver

Re: MYSQL: Concat two tables

Posted: Thu May 13, 2010 1:13 pm
by lauthiamkok
thanks for the reply. yes - union - is what i need.

sorry for not replying you guys earlier cos was not notified.

thanks! :D