Ask MySQL 2 tables to query the statement together.
This post was last edited by Dxmbxh6 on 2014-06-13 14:14:55
Table A
ID Time Title
1 2014-05-01 aaaaaaaaaaaa
2 2014-05-02 bbbbbbbbbbbbb
3
b table
ID Time URL
1 2014-05-03 CCCCCCCCCCCCCCCCCCCCCC
2 2014-05-04 ddddddddddddddddddd
3 2014-05-05 eeeeeeeeeeeeeeeeeee
4 2014-05-06 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
The desired result
Type ID
Date title
A 1 2014-05-01 aaaaaaaaaaaa
B 1 2014-05-03 CCCCCCCCCCCCCCCCCCCCCC
B 2 2014-05-04 ddddddddddddddddddd
B 3 2014-05-05 eeeeeeeeeeeeeeeeeee
------Solution--------------------
There is a problem with the design of this table. Can't be achieved.
------Solution--------------------
The Type field of the result is not in two tables, where does it come from?
------Solution--------------------
Select ' B ' as tname, ID, time
ORDER BY 2,1
------Solution--------------------
Don't see what logically album
Why is the id=2 of a table and the id=4 record of B table to be erased?