phaxmohdem
Golden Member
I've been at this so long my brain is starting to leave me. I've been having a heck of a time wrapping my head around this seemingly simple SQL problem. (MySQL)
I need to select the following data from to tables:
table1 ==> c_id(unique, PK), b_id, title, text, picture_info, start_date, end_date, added_date
table2 ==> n_id(unique, PK), b_id, sometext, posted_date
Each table basically describes a different object (say apples and oranges) I'm trying to combine data from both tables into one result set WHERE b_id equals a value passed to the query from a PHP script, and order it by date (descending) (added_date & posted date)
So I need a line of apples and oranges arranged by date. Seems straight-forward, enough, I"m just not having any luck with joins right now.
I need to select the following data from to tables:
table1 ==> c_id(unique, PK), b_id, title, text, picture_info, start_date, end_date, added_date
table2 ==> n_id(unique, PK), b_id, sometext, posted_date
Each table basically describes a different object (say apples and oranges) I'm trying to combine data from both tables into one result set WHERE b_id equals a value passed to the query from a PHP script, and order it by date (descending) (added_date & posted date)
So I need a line of apples and oranges arranged by date. Seems straight-forward, enough, I"m just not having any luck with joins right now.