read 1 fields of the same type
Posted: Sat Sep 20, 2008 8:51 am
he guys
my items table
Make
rockport
rockport
timberland
timberland
timberland
timberland
nike
nike
my code at the moment
Problem am facing is
it well print all the makes at once, but i only want it to print 1 make.. example blow:
rockport
timberland
nike
Thank you very much
my items table
Make
rockport
rockport
timberland
timberland
timberland
timberland
nike
nike
my code at the moment
Code: Select all
// SQL query to select the rows
$queryS = "SELECT * FROM items WHERE type = '$sC'";
$resultS = mysql_query ($queryS);
while($rowS = mysql_fetch_array($resultS,MYSQL_ASSOC))
{
Echo '<li><a href="products.php?action=2&item=' . $rowM[Id] . '&sub=' . $rowS[id] . '">' . $rowS[sub] . '</a></li>';
}
Echo '</ul></li></ul>';
}it well print all the makes at once, but i only want it to print 1 make.. example blow:
rockport
timberland
nike
Thank you very much