Alternative fetchAll function from MySQL.