I'm having a problem selecting using distinct and then doing a join. I am trying to just select one vehicle of a specific trim level if more than one exist but I do still need all the other data from the two tables.
I know the below code is wrong but I'm just learning this stuff and would greatly appreciate your assistance.
$query_CRV = "SELECT *, DISTINCT Vehicle_Additional_Information.Trim " .
"FROM ebizcardata " .
"INNER JOIN Vehicle_Additional_Information " .
"ON ebizcardata.Stock_No = Vehicle_Additional_Information.Stock_No "
"WHERE Modell = 'Accord' AND New_Used = 'New' AND Ext_Color = 'Taffeta White'
OR Modell ='Accord' AND New_Used = 'New' AND Ext_Color = 'White Diamond Pearl'" .
"ORDER BY Year ASC, STR_TO_DATE(Date_In_Stock, '%m/%d/%Y') ASC";