title: Mysqli insert id returning null
body: <pre><code>$S = "INSERT INTO ". TBD ." (NODE, AV, BV) VALUES ('15', '$name', '$email')";
  $Q = $CONN-&gt;query($S);
  $M = $Q-&gt;insert_id;
  </code></pre>
  
  <hr>
  
  <p><code>$M</code> returns <code>NULL</code> not <code>0</code></p>
  
  <hr>
  
  <p>The above script runs the query fine, but will not return the unique ID generated.
  The table, definitely has a auto increment and is a primary key.
  I have used the script elsewhere and works fine.</p>
  
  <p>So I have no idea why its returning NULL now.</p>