<?php 
    class Conexion{
      private $host = '45.79.38.135';
      private $username = 'desarrolloweb2';
      private $password = 'desarrolloweb2';
      private $database = 'sicanets_solidez_desarrollo';
      private $conexion;
      public function __construct(){
        $this->conexion = new mysqli($this->host, $this->username, $this->password, $this->database);
      }

      public function set_charset($charset){
          $this->conexion->set_charset($charset);
      }

      public function real_escape_string($var){
        return $this->conexion->real_escape_string($var);
      }

      public function num_rows($sql){
        $result = $this->conexion->query($sql);
        return $result->num_rows;
      }

      public function getInsertId(){
        return $this->conexion->insert_id;
      }

      public function consultaSimple($sql){
        return $this->conexion->query($sql);
      }
      public function consultaRetorno($sql){
        return $this->conexion->query($sql);
      }

      public function db_close() {
        return $this->conexion->close();
      }

      /*
          NgH9CMnSupydz8q => contraseña para correo de lepetit
      */

  }
 ?>