title: Call to a member function bind_param() on a non-object (unable to solve despite research)
body: <pre><code>$stmt = $mysqli-&gt;prepare('select Un from member where Lock = ? and Activated = ?');
  $stmt -&gt; bind_param("ss", 'N', 'Y');//This line gave the error
  $stmt -&gt; execute();
  $stmt-&gt;store_result();//apply to prepare statement
  $numRows = $stmt-&gt;num_rows;
  
  if ($numRows &gt; 0)//if have result
   while ($row = $stmt-&gt;fetch())
  </code></pre>
  
  <p>my above code gave me a <strong>"Call to a member function bind_param() on a non-object"</strong> error.
  I really don't get it why i getting this error. I have correct cols name.</p>
  
  <p>I am new to mysqli and would like to learn how to debug such error.</p>
  
  <ol>
  <li>what is the problem with my prepare statement or bind_param()?</li>
  <li>Please teach me how to debug such error</li>
  </ol>