Reputation: 6852
I have this kind of query, i will try to make it so simple to understand, he query is much bigger :)
$query = "SELECT * FROM Artist";
$query2= "SELECT * FROM News";
All table structure in Artist and in News is the same rows etc
ID Title Posts
Is it possible to join this two queries in one, and do something like shuffle ($query);
Upvotes: 0
Views: 251
Reputation: 171371
select ID, Title, Posts from Artist, 'Artist' as Type
union all
select ID, Title, Posts from News, 'News' as Type
Upvotes: 2