<?php  
require_once "config.php"; 

class Modelo 
{ 
    protected $_db; 


    public function __construct() 
    { 
        $this->_db = new mysqli("localhost","root","mined","mined"); 

        if ( $this->_db->connect_errno ) 
        { 
            echo "Fallo al conectar a MySQL: ". $this->_db->connect_error; 
            return;     
        } 

        $this->_db->set_charset("utf-8"); 
    } 
} 
?> 