title: mysqli->query returns true on update, but no rows affected
body: <p>I am experiencing some issues when trying to update rows in mysql.</p>
  
  <p>I've tried to print the query and run it in my sql client, and it updates the rows as expected.</p>
  
  <p>This line:</p>
  
  <blockquote>
    <p>$this->mysqli->query($query);</p>
  </blockquote>
  
  <p>Returns bool (true) as expected, and is correct according to the php documentation (<a href="http://php.net/manual/en/mysqli.query.php" rel="nofollow noreferrer">http://php.net/manual/en/mysqli.query.php</a>).</p>
  
  <blockquote>
    <p>Returns FALSE on failure. For successful SELECT, SHOW, DESCRIBE or EXPLAIN queries mysqli_query() will return a mysqli_result object. For other successful queries mysqli_query() will return TRUE.</p>
  </blockquote>
  
  <pre><code>public function query($query, $parameters = array()) {
      if ((is_array($parameters) &amp;&amp; count($parameters) &gt; 0) || (is_string($parameters) &amp;&amp; !empty($parameters))) {
          $this-&gt;lastPrepared = true;
  
          if ($this-&gt;prepare($query) === false)
              return false;
  
          $this-&gt;bind((is_array($parameters) ? $parameters : array($parameters)));
          if ($this-&gt;execute() === false)
              return false;
      } else {
          $this-&gt;lastPrepared = false;
  
          if (!$this-&gt;stmt = $this-&gt;mysqli-&gt;query($query)) {
              debug('Query failed: (' . $this-&gt;mysqli-&gt;errno . ') ' . $this-&gt;mysqli-&gt;error);
              return false;
          }
      }
  
      return $this-&gt;stmt;
  }
  </code></pre>
  
  <p>I have searched around, and found questions similar to my question, but non of the answers have helped me found a solution.</p>
  
  <p>EDIT: Okay, so I can see now that $this->mysqli->affected_rows; returns -1, which means that there is an error. However, mysqli->errno and mysqli->error are empty.</p>
  
  <p>The query I am trying to run is:</p>
  
  <blockquote>
    <p>UPDATE payments_scheduled SET active = 0 WHERE id=1 OR id=2</p>
  </blockquote>
  
  <p>Columns:</p>
  
  <p>id - type: int - length: 10 - extra: unsigned, pk</p>
  
  <p>active - type: tinyint - length: 1 - extra: unsigned</p>