title: PHP Warning: mysqli_fetch_object() expects parameter 1 to be mysqli_result,
body: <p>This is function where i take data from database:</p>
  
  <pre><code>public function model_pobierz_id_regionu_dla_nazwy($sRegion) {
              return $this-&gt;oDb-&gt;execute('
                      SELECT id 
                      FROM regiony
                      WHERE nazwa="' . $this-&gt;oDb-&gt;getSecureForm($sRegion) . '"');
          }
  </code></pre>
  
  <p>I have function where i get Warning, how can i delete this Warning:</p>
  
  <pre><code> $iRegion = Database::GetLikeObject($this-&gt;oDb-&gt;execute($this-&gt;oModel-&gt;model_pobierz_id_regionu_dla_nazwy($this-&gt;oView-&gt;aDane['wojewodztwo']))-&gt;id);
  </code></pre>
  
  <p>And function GetLikeObject:</p>
  
  <pre><code>        public static function GetLikeObject($aData)
          {
              return mysqli_fetch_object($aData);
          }
  </code></pre>
  
  <p>I take return this warning:<code>PHP Warning:  mysqli_fetch_object() expects parameter 1 to be mysqli_result,</code></p>
  
  <p>How i can delete this warning?</p>