I am using the query below
$result2 = mysql_query("select * from HandsetStock WHERE SubCategory NOT LIKE '%clearance%'", $dbh2);
I am getting a few duplicate results which I want to eliminate from the results however they are not completely duplicate rows. The column name is Make. I am guessing i need some kind of subquery but I am struggling to get it to work for me. Basically I need to select a开发者_如何学Pythonll records but where Make has the same value just the first record.
Thanks
$result2 = mysql_query("select * from HandsetStock
WHERE SubCategory NOT LIKE '%clearance%'
group by Make", $dbh2)
精彩评论