I know this question has been asked many times, but I\'ve read the answers to many of the questions and still cannot understand why I am receiving this error:
This also happen if you are trying to fetch a non SELECT query (Eg - UPDATE/INSERT/ALTER/CREATE). Make sure to use fetch or fetchAll only for SELECT queries.