INNER JOIN 3 tables not know how!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Locked
wHiTeHaT
Forum Newbie
Posts: 15
Joined: Thu Nov 17, 2005 2:48 pm

INNER JOIN 3 tables not know how!

Post by wHiTeHaT »

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.

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'");
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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

This doesn't need a second thread, especially in PHP - Code. Locked.
Locked