title: Count How Many Rows Inserted From Last SQL Query
body: <p>I have this query :</p>
  
  <pre><code>INSERT INTO db1.outbox (DestinationNumber, TextDecoded)
  SELECT User.CellPhone, '$SMSMessage' as TextDecoded
  FROM db2.User
  WHERE User.PurchaseDate BETWEEN 2012-01-01 AND 2012-01-31
  </code></pre>
  
  <p>it does multiple rows insertion to 'outbox' table. but I don't know how many rows inserted. how to have number of rows inserted from that SQL syntax? thanks.</p>
  
  <p><strong>update</strong>
  I got '-1' as result of this command :</p>
  
  <pre><code>$insertedRows = mysql_query("SELECT ROW_COUNT()");
  $rowInserted = mysql_fetch_array($insertedRows);
  $rowInserted = $rowInserted[0];
  echo $rowInserted;
  </code></pre>
  
  <p>but I see there are 27 rows inserted on my table. what did I do wrong?</p>