**********************
* id * typ * cl *
**********************
* 1 * 1 * 1 *
* 2 * 4 * 1 *
* 3 * 7 * 1 *
* 4 * 2 * 2 *
* 5 * 4 * 2 *
* 6 * 8 * 2 *
**********************
hi frnz, I have a problem with mysql group by... tired of looking on the google so finally posting it here... my table structure is as showing above. I am using the following query...
$sql2w=executeQuery("select * from logo group by cl ");
while($line2=mysql_fetch_array($sql2)){
echo $line2['typ'];
}
I am getting 1 and 2 in the result, but I want the result in this format.. 1,4,7 and 2,4,8 in string or in array format...
I hope I am clear what I want...
I am only getting the first row values of "typ" column but I want all rows values in array after grouping the "cl" column..
Thanks in advance