ok here is my code maybe someone out there can explain what I am doing wrong here as I just don't get it. My understanding of this is that IF the stmt finds a result it will then run the code in the {} and hence return a result. And IF there is no result then it would return nothing, as the IF statement is false. But I am getting a return in postman even though the ID that I am searching is false. It does not exist on the table. Why do I get a return?

```
 public function getDoc($ID){

  if(  $xromstmt = $this->con->prepare("SELECT adegree, bdegree, cset, dset FROM xromdb WHERE ID = ?"))  {

    $xromstmt->bind_param("s", $ID);
    $xromstmt->execute(); 
    $xromstmt->bind_result($adegree, $bdegree, $cset, $dset);

    $xromstmt->fetch(); 
    $evalxrom = array();
    $edocxrom = array();

 some other code here dealing with the return etc... }  <-- the end bracket 
to the if statement.  There is nothing past this bracket.

     } bracket to getDoc

```