Hi, i have 2 mysql tables and i want to get datas from both of them.
my tables has both name and date in them. I want to get the data from both tables, sorted by the date, at one call. how do i do this?
getting datas from two mysql table
Moderator: General Moderators
It will be easier to help you if you show your table layout. Or example of what you've tried. Without knowing that info. try this...
Code: Select all
table 1
field_name
field_date
table 2
field_name
field_date
select a.field_date,b.field_date from table_1 as a LEFT JOIN table_2 as b on a.field_name=b.field_name where a.field_name='whatever'