La fonction retourne toujours int(0) meme si le couple username est dans la base de données.voici mon code
<?php
$db = new PDO('mysql:host=localhost;dbname=portfolio','root', 'root');
if(isset($_POST['username']) && isset($_POST['password'])){
$username = $db->quote($_POST['username']);
$password = $_POST['password'];
$select = $db->query("SELECT * FROM users WHERE username=$username AND password='$password' ") or print_r($db->errorInfo());
var_dump($select->rowCount());
}
?>