title: INSERT query produces "Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given"
body: <p>I am confused about why I am received the following message:</p>
  <blockquote>
  <p>mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given</p>
  </blockquote>
  <p><strong>This question is different from previous queries</strong> because my query actually <strong>executes correctly</strong> (values were indeed entered into the database). So, I would expect MySQL to return a result set and NOT A BOOLIAN.</p>
  <p><strong>Below is my function:</strong></p>
  <pre><code>function join_main_newsletter($firstName = null, $email)
  {
      global $dbc;
      $valuesEntered = &quot;values entered&quot;;
  
      $insert = &quot;INSERT INTO newsletter (first_name, email ) VALUES ('name', 'testemail@yahoo.com')&quot;;
  
      $R3 = mysqli_query($dbc, $insert) or trigger_error(&quot;Query Failed! SQL: $sql - Error: &quot; . mysqli_error(db_conx), E_USER_ERROR);
      if (mysqli_num_rows($R3) == 1) {
          return $valueentered;
      } else {
      }
  }
  </code></pre>
  <p><strong>And here is part of the results from the error:</strong></p>
  <pre><code>[valuesEntered] =&gt; values entered
      [insert] =&gt; INSERT INTO newsletter (first_name, email ) 
                    VALUES ('name', 'testemail@yahoo.com')
      [R3] =&gt; 1
  </code></pre>