How do you SELECT *, when you want to select DISTINCT?
Posted: Fri May 21, 2010 11:05 am
$result = mysql_query ("SELECT *, DISTINCT category FROM products WHERE pause = 'off' ORDER BY category ASC");
This doesn't work. And most SQL wizards here will probably see why.
I need to select everything from the row, where the DISTINCT query products a result.
ie, if there are 5 results (out of 50 rows for ex.), it has has all fields from it.
This doesn't work. And most SQL wizards here will probably see why.
I need to select everything from the row, where the DISTINCT query products a result.
ie, if there are 5 results (out of 50 rows for ex.), it has has all fields from it.