MYSQL GROUP BY 2 Tables -


i have 2 tables:

games softwares 

and have rows:

games:

id | ref_id | title  1 |   20   |  nikita  1 |   18   |  simba 

softwares:

id | ref_id | title  1 |   18   |  adware  1 |   19   |  acdsee 

now want group ref_id , get:

20 18 19 

select ref_id games union  select ref_id softwares  

this answer according result needed , table structure have mention.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -