$query_state = "SELECT DISTINCT(STATE) FROM USER";
$res = mysql_query($query_state);
while ($line = mysql_fetch_array($res, MYSQL_ASSOC))
{
$query_user = "SELECT COD_USER FROM USER WHERE STATE = '".$line["STATE"]."'";
$res_user = mysql_query($query_user);
while ($line_user = mysql_fetch_array($res_user, MYSQL_ASSOC));
{
echo "COL: ".$line_user["COD_USER"]."<br>";
}
}
Why in the name of the lord tjhis doesn't print out anything?????
It just prints COL: (without the result from table) two times, but there are THREE users on this table.
The data and the query ARE correct!
HELP!!!!