title: Unknown error in bind_param in mysql
body: <p>Hi i got this error message on mysql query which has taken a toll of my time. </p>
  
  <blockquote>
    <p><b>Fatal error</b>:  Uncaught Error: Call to a member function bind_param() on unknown in ... </p>
  </blockquote>
  
  <p>Anyone encounter this unknown error before?</p>
  
  <p>How can mysql display the error? </p>
  
  <p>Below is my query: </p>
  
  <pre><code>($db-&gt;prepare('INSERT INTO program_list(
              PROGRAM_CODE_ID, MONTH, PDATE, HOURS, PUNIQUE, AUNIQUE, 
              EYEBALL, LEVEL, REMARK, REVENUE, TRAINER_ID, CLIENT_ID, ADMIN_ID, UPD_TIME) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)')) || fail('MySQL prepare', $db-&gt;error);
  
  $stmt-&gt;bind_param('ssssssssssssss', $program_code, $month, $pdate, $hours,  $unique, $adult, $eyeball, $lvl,  $remark, $revenue, $trainer_id, $client_id,  $admin_id, $time) || fail('MySQL bind_param', $db-&gt;error);
  </code></pre>
  
  <p>I did the echo of the query with variables and able to execute the query successfully on phpmyadmin.</p>