I have the following tables

Dishes table:

Category table:

t_time table:

To get connect a dish with the ingredients I have the following code which works:
$sql = "SELECT d.name, i.item\n"
. "FROM dish d\n"
. "JOIN dish_ingredients di ON ( d.id = di.dish_id )\n"
. "JOIN ingredients i ON ( di.ingredient_id = i.id )\n"
. "WHERE d.id =1\n"
. "LIMIT 0 , 30";
but now I want to connect the dish with the matching categories/t_time and cuisine . instead of having time= 6 and Category 3 being displayed when I do the query I want it to display 60 and fish instead. What would be the easiest way to do this? a good tutorial might help as well.
just join the tables just like the way you are doing.
If it is possible that a dish can have nullable values on
category,cuisine, andt_time, useLEFT JOINinstead ofINNER JOIN. Basically,INNER JOINdisplays row on which it has at least one match on the table on which you have joined while theLEFT JOINdisplays even if it has no rows on the other table.