Undefined property: PDOStatement::$num_rows : <p>This doesn't work:</p>

<p>// Extract data items from dataset</p>

<p>I've been all over the web for two days, including previous answers here</p>

<pre><code>    if ($result-&gt; num_rows &gt; 0)
        {
        while($row = $result-&gt; fetch_assoc())
</code></pre>

<p>Connected successfully
Notice: Undefined property: PDOStatement::$num_rows in E:\web\peoplespoll\htdocs\TableTest.php on line 64
0 result
Fatal error: Uncaught Error: Call to undefined method PDO::close() in E:\web\peoplespoll\htdocs\TableTest.php:83 Stack trace: #0 {main} thrown in E:\web\peoplespoll\htdocs\TableTest.php on line 83</p>
