I have the following query :

'SELECT Active FROM tbUsers WHERE Id=55'


The Id is unique and I need just to know the status of the user if he's active yes or no. The Column Active is set as boolean in Mysql

When I tried to return the result like the following (using another php function) :

$result = $this-&gt;selectRow($db,"tbClass","Active","Id='$Id'");
if($result) { return "ok" ; } else { return "nok" ;)


it returns 'ok' on both cases.
Any idea what's wrong with it ?

Here is the other function :

public function selectRow($db,$tableName,$field,$where) {
        if($where == "") {
            $query = "SELECT $field FROM $tableName";
        }
        else
        { $query = "SELECT $field FROM $tableName WHERE $where"; }

        $result=$db-&gt;Qry($query);


        if ($result) {
            $no_of_rows =  $db-&gt;TotRows($result);
            if($no_of_rows == 1) {
                return $result;
            }
            if($no_of_rows == 0) {
                return '';
            }
            if($no_of_rows &lt; 0) {
                die('Invalid query: ' . $sender ."(".$query  ."): ".mysql_errno().": ". mysql_error());
                return '';
            }
        } 
        else {
            die('Invalid query: ' . $sender .": " .$query.": ". mysql_errno().": ". mysql_error());
            return '';
        }
    }


Qry Function is the following :

function Qry($sql) {
    if($result = mysqli_query($this-&gt;con,$sql) ) {
        return $result;
    }
    else 
    {
        $err = "Error: ".$sql. " :: ". mysqli_error;
        die("$err");
    }
}



Question: Saturated Density Plots
Answer: It's difficult to help without photo data, but I'm almost sure that PlotRange can solve your problem.
Try to control Z coordinate in PlotRange as in this example, to find a better range to your plot.

pSaturated=DensityPlot[Exp[-10(x^2+y^2)],{x,-1,1},{y,-1,1},ImageSize-&gt;400];
pOK=DensityPlot[Exp[-10(x^2+y^2)],{x,-1,1},{y,-1,1},PlotRange-&gt;{All,All,{0,1}},ImageSize-&gt;400];
Row[{pSaturated,pOK}]