title: mysqli prepared expect parameter?
body: <p>I try to write own database class.I have some problem.</p>
  
  <p>When I run it , it gives these errors.</p>
  
  <pre><code>Warning: mysqli_stmt_bind_param() expects parameter 1 to be mysqli_stmt, boolean given in /Users/emrecetin/www/ayrox/m/db.php on line 75
  
  Warning: mysqli_stmt_execute() expects parameter 1 to be mysqli_stmt, boolean given in /Users/emrecetin/www/ayrox/m/db.php on line 76
  
  Warning: mysqli_stmt_bind_result() expects parameter 1 to be mysqli_stmt, boolean given in /Users/emrecetin/www/ayrox/m/db.php on line 77
  
  Warning: mysqli_stmt_fetch() expects parameter 1 to be mysqli_stmt, boolean given in /Users/emrecetin/www/ayrox/m/db.php on line 78
  </code></pre>
  
  <p>on these line;</p>
  
  <pre><code>mysqli_stmt_bind_param($sor, 's', $hede);
  mysqli_stmt_execute($sor);
  mysqli_stmt_bind_result($sor, $bas);
  mysqli_stmt_fetch($sor);
  </code></pre>
  
  <p>I will give short version of databse class.It is not exactly, I write just what I use.</p>
  
  <pre><code>class db{
  
      public $durum;
      protected $server = 'localhost'; 
      protected $suser = 'root'; 
      protected $spass = 'root';
      public $db = 'members'; 
  
      public $durum; // mysqli durumu
      public $sor; // mysql_query ile birleştirilen hali
      public $kacsonuc;
  
      function db(){
          $this-&gt;durum = mysqli_connect($this-&gt;server,$this-&gt;suser,$this-&gt;spass);
          $this-&gt;dbchoose($this-&gt;db)
      }
  
      function dbchoose($db){
          if(!mysqli_select_db($this-&gt;durum,$db)){ 
              $this-&gt;errors[] = 'Database cant choose';
              $this-&gt;hata=True;
          }
  
      function see(){
          $id = 'select * from uyeler where id=?';
          $sor = mysqli_prepare($this-&gt;durum, $id);
          $hede = '3';
          mysqli_stmt_bind_param($sor, 's', $hede);
          mysqli_stmt_execute($sor);
          mysqli_stmt_bind_result($sor, $bas);
          mysqli_stmt_fetch($sor);
      }
  
  }
  </code></pre>
  
  <p>what is the problem ? I cant understand.Thank you (and sorry for my grammer).</p>