OK I have two sql tables I need to query from which are product and product_to_category
product looks like

product_to_category looks like

I am trying to query both the tables so that I can select all that are in a certain category number, which is in product_to_category, but also select all that have a status of 1, which determines if they are active or not. I am trying to do this in a single query, and so far my query looks like what is below, problem is that I am not sure how to match the product_id‘s together to work how I would like. Can someone give me an idea of how to do this?
mysql_query("SELECT * FROM product,product_to_category WHERE product.status = 1 AND product_to_category.category_id = 35 ORDER BY product.sort_order ASC")
Try this:
mysql_query("SELECT * FROM product JOIN product_to_category ON (product.product_id = product_to_category.product_id) WHERE product.status = 1 AND product_to_category.category_id = 35 ORDER BY product.sort_order ASC")