php oop connection issue. The error that it shows is briefly explained below
<p>This is the error I'm getting:</p>

<blockquote>
  <p>mysqli_query() expects parameter 1 to be mysqli, object given in E:\wamp\www\mm\classes\db_class.php on line 11</p>
</blockquote>

<p>I have three files</p>

<ol>
<li>config.php <br></li>
<li>db_class.php <br></li>
<li>index.php <br></li>
</ol>

<p><strong>config.php</strong></p>

<pre><code>error_reporting(E_ALL);
define('HOST','localhost');
define('USER','root');
define('PASSWORD','');
define('DATABASE','mm');

class con {
    function __construct(){
        $con=mysqli_connect(HOST, USER, PASSWORD, DATABASE);
        // Check connection
        if (mysqli_connect_errno()){
            echo "Failed to connect to MySQL: " . mysqli_connect_error();
        }
    }
}
</code></pre>

<p><strong>db_class.php</strong></p>

<pre><code>&lt;?php

    include 'config.php';

    class db {
        private $con;
        function __construct($con) {
            $this-&gt;con=$con;
        }
        public function product(){
            $con=$this-&gt;con;
            $result = mysqli_query($con,"SELECT * FROM attribute_id")or die (mysql_error());    
            while ($row = $result-&gt;fetch_assoc()) {
                $arr[]= $row;
            }   
            return $arr;
        }   
    }

?&gt;
</code></pre>

<p><strong>index.php</strong></p>

<pre><code>&lt;?php

    include "classes/db_class.php";

    $con=new con();
    $products= new db($con);
    $product_data= $products-&gt;product();
    print_r($product_data);

?&gt;
</code></pre>