What you'd do is simply:
$tsql = "SELECT dealerprice.product FROM dealerprice WHERE product not in (SELECT productdetail_idproductdetail FROM Dpmix_Has_Productdetail1)";
It's what comes next that you need to consider.
You need to do the following (in php):
1) Establish a connection to a database
2) Execute the query
3) Retrieve the rowset(s) - if any, that are returned
4) Make use of the rowset data, depending on what you're planning to do with this
MySQL is usually included with any php package (the 'P' in LAMP).
If it's a SQL database, you need to get the .php drivers (free from Microsoft)
As to how to create the queries, you should get yourself a good php reference.
A very simple one:
http://www.w3schools.com/php/php_mysql_intro.asp[
^]