INNER JOIN 3 tables not know how!
Posted: Fri Oct 13, 2006 8:22 pm
Hello @all
i'm having an issue with a db call.
The folowing query is the one i use now, however i made a mis-coding couse it shouldnt rely on this call only at the end.
This is couse i have to see if there's aditional data required.
This worked in my first attempt and was verry excited , this excitement ended when i came to conclusion i had no way to retrieve the aditional data.
my db is as folowing:
tables: items|items_to_calendar|calendar
al 3 have value $products_id
i came to conclusion i have to fetch the data via items_to_calendar but i really dont now how to inner join the other 2 tables in a correct way.
i'm having an issue with a db call.
The folowing query is the one i use now, however i made a mis-coding couse it shouldnt rely on this call only at the end.
This is couse i have to see if there's aditional data required.
Code: Select all
$result = $db->sql_query("SELECT UNIX_TIMESTAMP(calendar_date) AS calendar_date, calendar_id, calendar_price, did FROM calendar WHERE MONTH(calendar_date)='$monthID'");my db is as folowing:
tables: items|items_to_calendar|calendar
al 3 have value $products_id
i came to conclusion i have to fetch the data via items_to_calendar but i really dont now how to inner join the other 2 tables in a correct way.