Excuse me, I do not make a clear question in english.
I need some mysql query like this: query out all the item names, UNION by two tables, but not repeat.
here is my table structure:
table: cxt_20110105
item | ... many columns, but does not affect query, because I just need item.
art |
collectibles |
furniture |
books |
arts |
books |
... many lines...
table: cxt_20110106
item | ... many columns, the columns structure is as well as table: cxt_20110105.
art |
tickets |
cars |
furniture |
tickets |
cars |
... many lines...
So
mysql_query(//how to write in here?)
while ($row = mysql_fetch_array($result))
{
//the result should be: art, collectibles, furniture, books, tickets, cars(every word, but not repeat) ;
}
Thanks.
UNION will remove the duplicates for you.