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

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -