php - SELECT * FROM table where id is in other table -
i have 2 tables:
items_table
item id item1 1 item2 3 item3 2 item4 1 item5 3
colors_table
id color 1 red 2 green 3 blue
how can select items
items_table
color = blue
?
i think should use join don't know how use.
can me, please?
try this:
select * items_table join colors_table ct on it. id = ct.id ct.color = "blue"
Comments
Post a Comment