title: Fatal error: Uncaught Error: Call to a member function RowCount() on bool
body: <p>ı have a problem my login page. I got this error: 
  Fatal error: Uncaught Error: Call to a member function RowCount() on bool in C:\xampp\htdocs\root\login.php:43 Stack trace: #0 {main} thrown in C:\xampp\htdocs\root\login.php on line 43</p>
  
  <pre class="lang-php prettyprint-override"><code>  &lt;?php
  
                      if(isset($_POST['loginRequest'])){
  
                          $username = $_POST['email'];
                          $password = $_POST['password'];
                          $Sifreli = md5($password);
  
                          $query = $db-&gt;query("SELECT * FROM yonetim WHERE username = '{$username}'")-&gt;fetch(PDO::FETCH_ASSOC);
                          if($say = $query-&gt;RowCount()){
                          if ($say &gt; 0){
                              $user = $query;
                              if($user['pass'] == $Sifreli){
                                  $_SESSION['LOGGED'] = $user['username'];
                                  if(isset($_SESSION['LOGGED'])){
                                      header('location:index.php');
                                  }
                              } else {
                                  echo "Kullanıcı adı veya şifre hatalı!";
                              }
                          } else {
                              echo 'Böyle bir kullanıcı bulunmamaktadır.';
                          }
                      }
                      }
                      ?&gt;
  </code></pre>