johnnyd1963 Posted October 22, 2012 Share Posted October 22, 2012 (edited) My question is How to select form 2 tables where column1 = x order by column2 desc in PHP MYSQL thanks in advice John Edited October 22, 2012 by johnnyd1963 Quote Link to comment https://forums.phpfreaks.com/topic/269763-select-2-tables-at-once/ Share on other sites More sharing options...
silkfire Posted October 22, 2012 Share Posted October 22, 2012 You'll have to use a JOIN of some sort on a column with common values. Quote Link to comment https://forums.phpfreaks.com/topic/269763-select-2-tables-at-once/#findComment-1386908 Share on other sites More sharing options...
johnnyd1963 Posted October 22, 2012 Author Share Posted October 22, 2012 Tanks for your advice i got $query3 ="SELECT * FROM narr_turnier_".$onlyconsonants." UNION ALL SELECT * FROM narr_turnier_".$onlyconsonants."_ster WHERE id_turnier_jaar=".$idjaarturnier." order by rang"; Quote Link to comment https://forums.phpfreaks.com/topic/269763-select-2-tables-at-once/#findComment-1387053 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.