PDO::rowCount() returning -1
问题 i have this function below. that i used to run on a MySQL DB. I had to move to a SQL Server 2008 , easy thing. But, after that, the rowCount() keeps returning -1 , I've never had this happen before. I'm sure that my SQL query is returning the results, because if I do a print_r() on my return (the $rows var), everything gets printed. So, if anyone had this issue, please help me to figure this out. Sorry for any grammatical mistake. public function listar(){ $retorno = array(); $sql = "SELECT m