title: how to get selected number of rows in SELECT statement?
body: <p>I want to get the number of rows selected and <code>sender</code> value from the table using sql query. </p>
  
  <pre><code>$sql='SELECT sender 
        FROM messages 
        WHERE message_id = :message_id';
  $sender_result = $db-&gt;query($sql, array(':message_id'=&gt;$message_id));
  $sender = $sender_result-&gt;fetch();
  </code></pre>
  
  <p>Please Help me. Thanks.</p>