[Solved] MYSQL/PHP SELECT DISTINCT


Looks like the query is actually pulling 3 results as it should. You are just letting one of them go:

function adminnav (){
    $pagewcoms = mysql_query(...);

    // HERE YOU FETCH ONE ROW BUT DO NOTHING WITH IT
    $idnavrow = mysql_fetch_row($pagewcoms);

    while ($itest = mysql_fetch_row($pagewcoms)) {
        echo "$itest[0] <br />";
    }
}

If you just remove that line, or tweak it a little, it should display everything just fine:

function adminnav (){
    $pagewcoms = mysql_query(...);
    $idnavrow = null;

    while ($itest = mysql_fetch_row($pagewcoms)) {
        if (empty($idnavrow)) {
            $idnavrow = $itest;
        }
        echo "$itest[0] <br />";
    }
}

2

solved MYSQL/PHP SELECT DISTINCT