ckrudelux Posted August 28, 2009 Share Posted August 28, 2009 How do I get information from the database from two diffrent tables and show them like one query which is has the order with the newst first?(MYSQL) Link to comment Share on other sites More sharing options...
i_gresn Posted August 28, 2009 Share Posted August 28, 2009 Use the SQL join function, you need to specify a column you are going to use to bind the two tables.see more info here:http://www.w3schools.com/sql/sql_join.aspAlso specify the results order with 'order by' then you get it to display in whatever order you want. Link to comment Share on other sites More sharing options...
ckrudelux Posted August 28, 2009 Author Share Posted August 28, 2009 Use the SQL join function, you need to specify a column you are going to use to bind the two tables.see more info here:http://www.w3schools.com/sql/sql_join.aspAlso specify the results order with 'order by' then you get it to display in whatever order you want.Okay but that is just geting data compared between to tables I want to get all the data from the one table1 and table2 and have them showed as order by time/date so instead of doing two selects geting 30 rows from table1 and after table1 comes 30 rows from table2. Link to comment Share on other sites More sharing options...
ProblemHelpPlease Posted August 29, 2009 Share Posted August 29, 2009 Have a look at using UNION or UNION ALLhttp://www.w3schools.com/sql/sql_union.asp Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.