Hi all.May i know why distict does not work in switch case below :
switch ($m){
case "title":
$query = "select id,artist,track,album,title from files where title like '%$s%'order by track";
break;
case "album":
$query = "select DISTINCT id,artist,track,album,title from files where album like '%$s%' ";
break;
case "artist":
$query = "select DISTINCT id,artist,track,album,title from files where artist like '%$s%'order by artist";
break;
}
I be happy if an expert help me how to exclude rpeated values from result sets.Thanks
switch ($m){
case "title":
$query = "select id,artist,track,album,title from files where title like '%$s%'order by track";
break;
case "album":
$query = "select DISTINCT id,artist,track,album,title from files where album like '%$s%' ";
break;
case "artist":
$query = "select DISTINCT id,artist,track,album,title from files where artist like '%$s%'order by artist";
break;
}
I be happy if an expert help me how to exclude rpeated values from result sets.Thanks