I have 2 tables referenced within a Mysql Database
Table 1 has arround 3000 lines of data and Table 2 has 1300 lines of data. both tables have different fields but both have a field named "product" which is a numeric number.
I am after some how querying the table with 1300 lines which has a field named product. And instructing Table 1 to delete any lines that DO NOT reference those that are within Table 2. Hereby me having 2 tables with 1300 lines.
The reason behind this is that Table 1 is a product table that has an entire product database but 1700 of them are old and not used. Table 2 has the stock control for the products and i only want to show the stock that has products on a website instead of people seeing products which are out of stock
Thank you in advance