PHP Using PHP with MySQL Using Relationship Tables in MySQL Querying Two Tables with JOIN

tzehuilee
tzehuilee
19,911 Points

Table product_sizes doesn't exist when selecting the product_sku, size_id in phpmyadmin

So I copy, paste, and execute the SQL script that created the two tables product_sizes and sizes. I selected my database under name mikeshirts and it physically revealed the tables. In the course, I tried to ran the script:

SELECT product_sku, size_id FROM product_sizes WHERE product_sku = 108

All I received is an error stating that:

1146 - Table 'mikeshirts.product_sizes' doesn't exist.

What's strange the product_sizes table has already existed and I could actually browse and see the structure in phpmyadmin.

2 Answers

Jacob Horvat
Jacob Horvat
13,163 Points

Are you sure it's product_sizes and not products_sizes?

maybe you created it under a different database? is this on treehouse or locally? either way try creating it again..

tzehuilee
tzehuilee
19,911 Points

I rename the original database from "shirts4mike" to "mikeshirts". It's on my computer by the way.