How do I create a MySQL query to pull node id using the sku?
I have an image hosting site outside Drupal and I'm wanting to put a link next to each image that points to the correct node, so I'm trying to figure out the mysql query that I need to do this. I know the SKU for each image. My understanding is that I need the commerce_product and node tables in a join query. Are these the only two tables I need?
known values: SKU
needed value: node id
A plus would be to pull the alias instead of the node, but having the node would be enough. I can then create the html needed to make the link: <a href="http://example.com/products/$nodeid">$sku</a>
I also posted this question here: http://www.drupalcommerce.org/questions/3176/how-get-node-id-product-dis...